BEPU CharacterController

Dec 21, 2012 at 3:21 PM
Edited Dec 21, 2012 at 3:22 PM

Good evening

I asked this question before on the sunburn forums, but I didn't get an answer until yet (I know, everyone's buying gifts and everything) and this is maybe the better place to ask (it's not just importand for the character controller, but also for future attempts to integrate BEPU components):

I implemented all the CharacterController classes from the bepu character example. 
If I try to add it to the space of the BEPUPhysicsManager, I get an InvalidCastException.

CharacterController characterController = new CharacterController(new Vector3(0f, 5f, 0f), 180f, 90f, 30f, 80f);

And the Exception (I don't think the whole stacktrace would help): 

Unable to cast object of type 'LeoZ.Evolet.Logic.Character.CharacterSynchronizer' to type 'SynapseGaming.LightingSystem.Collision.ICollisionObject'.

I don't think it would make sense to implement the ICollisionObject myself... Did someone get this to work? Am I adding the controller to the wrong space?

Btw, I heard about an existing CharacterController implementation in the bepu plugin, but I get "Unable to load resource package" when I try to open the sbpack (I have the right Sunburn Version), so I couldn't try.

I'm using Sunburn Pro

Thanks in advance