Good value to make a player move ?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
saturn1
Posts: 34
Joined: Thu Dec 24, 2009 11:14 pm

Good value to make a player move ?

Post by saturn1 »

Hello i have some problem with character movement.

I set mass of 20 and a lineardamping at 0.9 and at each update i apply an impulse of 500.

Sometimes my entity accelerated and disappear from map when there is collision.

What are good value to avoid entity accelerated ?


Thank you.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Good value to make a player move ?

Post by Norbo »

I don't know why there would be discontinuous fly-out-of-the-map acceleration, but using apply impulse and damping together is not a very robust form of character control.

I would recommend using the CharacterController, SphereCharacterController, or SimpleCharacterController found in the BEPUphysicsDemos project source (in the main source download: http://bepuphysics.codeplex.com/SourceC ... changesets).

Using a 'real' character controller, you have control over max speeds and all sorts of other helpful things.

A little more information about characters can be found in this blog post: http://www.bepuphysics.com/blog/2011/8/ ... tails.html
The SphereCharacterController is newer and isn't included in the post, but it lies somewhere between the SimpleCharacterController and CharacterController. If you don't need high stepping, the SphereCharacterController is a good choice.
Post Reply