• Advertisement
Sign in to follow this  

Character physics in platformer

This topic is 3573 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm putting together a physics-based platformer using Box2D. I'm wondering if anyone has some suggestions on how to represent characters/baddies in the physics world. I (very) briefly considered actually building a biped from physics primitives and programming walking animations, but quickly realized this would be unworkably difficult. Perhaps a rough bounding box with most of its weight at the bottom (to prevent tipping) and a high friction coefficient? Does anyone have experience doing something like this, that has some recommendations? Thanks,

Share this post


Link to post
Share on other sites
Advertisement
Typically you wouldn't represent characters as physical models like that at all. Ideally you should use simplified physics for the characters by using a bounding sphere/box/ellipsoid for collision and gravity and simple friction that causes them to slide in too steep hills. The bounding volume should always maintain its orientation.

If you can get contact information from the collision detection easily, without running the characters as a part of the physics sim, I suggest that you do the above yourself separately for the characters. When a character dies, you can substitute it with a ragdoll model for fun.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement