How to match charactercontroller with XNAnimation
Posted: Fri Feb 12, 2010 7:11 pm
Hi,
I'm trying to use BEPU with the XNAnimation library and everything seems to work except the collision detection. I assigned my charactercontroller to the player and updating its position by using: characterController.body.moveTo(player.Position);
I've created the charactercontroller with the following statement:
characterController = new CharacterController(correctedPosition, 10, 4.5f, 20f, 1.4f, .01f, .04f);
and my 'level data' as a StaticTriangleGroup.
Both are assigned to my space and I added an event to the charactercontroller using:
characterController.body.eventManager.addEventHook(new BEPUphysics.Events.EventHandlerInitialCollisionDetected(handlePlayerCollision));
When I draw the entities with the entitydrawer I see them collide but the event is not raised. Any idea what I have forgotten?
PS: Is there any good tutorial on how to mix XNAnimation and BEPU together?
Kind regards,
Cygnus
I'm trying to use BEPU with the XNAnimation library and everything seems to work except the collision detection. I assigned my charactercontroller to the player and updating its position by using: characterController.body.moveTo(player.Position);
I've created the charactercontroller with the following statement:
characterController = new CharacterController(correctedPosition, 10, 4.5f, 20f, 1.4f, .01f, .04f);
and my 'level data' as a StaticTriangleGroup.
Both are assigned to my space and I added an event to the charactercontroller using:
characterController.body.eventManager.addEventHook(new BEPUphysics.Events.EventHandlerInitialCollisionDetected(handlePlayerCollision));
When I draw the entities with the entitydrawer I see them collide but the event is not raised. Any idea what I have forgotten?
PS: Is there any good tutorial on how to mix XNAnimation and BEPU together?
Kind regards,
Cygnus