Best way to move a physic dude ?

0 favourites
  • 3 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hey everyone ! I've a small question for you. Until now, my character was moving because I've added some values in the corresponding velocity (x or y, depending of the pressed touch). It works, and it's perfect to test my settings (shaders, dynamic light, physic behaviors...) but I'm pretty sure there is another way to make it move.

    Knowing that I don't use Box2D but Chipmunk physic (), can I ask how do you move your own physic characters to make it as fluide and realistic as possible ? (Even if you use Box2D, i'm just curious about it, because all my previous results were not bad but still a little...robotic ? I don't have the word, hope you understand anyway).

    Using velocity only is something. But I presume that there's some ways to do it with force or impulse, right ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Chipmunk is a good choice - I posted a wip example of a physics platformer in that thread: https://dl.dropboxusercontent.com/u/523 ... pe_v2.capx

    I'm setting velocity directly, which should usually be avoided in a physics engine, but because I'm raycasting to test if you're next to a wall or on a slope I can prevent any clipping issues.

    The reliable way to accelerate your player is by applying force (impulses are for instant movements like explosions or jumping). It won't cause any clipping problems. You can give the player a speed limit with the set max speed action, then decelerate by either increasing grounded friction or applying a force opposite to player.chipmunk.angleOfMotion.

    Lots of ways to do it, just play around. For raycasting (to get info about what the player is in contact with, or will be in the next frame) check out events 30-39 in my example.

  • Hey ! Thanks for your replying. I didn't have the time to study your prototype yet, I just tried it and it seems to be a great work. I'm sure I'll learn a lot about it ! Also, thanks for these informations, I'll take note.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)