LordofLolcats

Members
  • Content Count

    4
  • Joined

  • Last visited

About LordofLolcats

  • Rank
    Newbie

Profile Information

  • Gender
    Not Telling

Contact Methods

  • Twitter
    willia_am
  1. Hello there, Using Mozilla/5.0 here (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0 on Windows 7. I'm around 38/45 FPS. I have a shitty PC but it's pretty smooth. Keep the good work
  2. Edit: Problem fixed. My mistake. Never mind.
  3. The players doesn't control the bodies. That actually solves my problem, again thank you for your precious help. This doc ( http://schteppe.github.io/p2.js/docs/classes/World.html#method_step ) about world.step is quickly documented but doesn't offer all those details that help us to understand. Have a nice day.
  4. Hello everyone, It's my first topic in that forum and I'm here today because I've an (logicial ?) issue with the physics librairy p2.js. I'll try to explain my problem in the simplest way possible. I'm working on a game based on my own framework coupled with p2.js. In that game, the physical world needs to be updated at a constant time. For now, I'm using a requestAnimationFrame to call the world.step function but that means if the player have a slower PC, the game will be slower and the opposite is also true. I've made an animation in Photoshop (not perfect but whatever) to show you what I exactly want: So, I've two objects that are supposed to move at the same speed. Let's assume that the red line is the timeline. With the first object, we see when we have a little freeze, he stop then continue with the same speed where he stopped. But when you look at the second one, after the freeze occurred the object goes to the correct position following the timeline. My question is, can we do that with p2.js ? Or it's not about p2.js and I'm missing something ? I did some tests based on the documentation with the others arguments for the function world.step() but doesn't seems to work at all. Hope you can help me with this problem and thanks for your answers ! Have a great day