IGF Bepu implementation and character controller

Jul 22, 2012 at 8:52 AM

What would be the best way to create something similar to sunburns CharacterController component?

I'm thinking that setting the rotation components of the world matrix to 0 via a custom behaviour like AoS's PlaneConstraintBehaviour.

The only thing I cant figure out is how to move the object up steps like the CharacterController does. Does anybody know how this might be acheived?

Jul 22, 2012 at 6:47 PM

There are character controller examples in the bepu demos http://www.bepuphysics.com/blog/2011/8/8/v0162-character-controller-details.html

I use a variation on the AOS PlaneConstraintBehavior but dont have a requirement to move up steps

Adding the following 2 lines to the Force2DConstraint

BEPUphysics.Entities.Prefabs.Box collisionEntity = ((BEPUBoxCollisionMove)((ICollisionObject)Agent.ParentObject).CollisionMove).Entity;   collisionEntity.LocalInertiaTensorInverse = new Matrix3X3(0,0,0,0,0,0,0,0,0);

Will also prevent the object from spinning in reaction to collisions

Jul 22, 2012 at 8:53 PM

Thanks thats really helpful, I'll check those demos out.