I've basically modified the CharacterController class so it derives from Cylinder rather than holding reference to one internally, which means it no longer derives from Updateable (but Cylinder effectively implements ISpaceUpdateable anyway). I still override the OnAdditionToSpace and OnRemoveFromSpace methods as the original CharacterController does but now it has to be 'protected override' rather than 'public override'.
All seems to work very... on my PC... but on the Xbox I get the error...
"An unhandled exception of type 'System.MethodAccessException' occurred in BEPUplugin.dll"
(BEPUplugin.dll is my BEPU wrapper for SunBurn which I'm currently in the process of updating)
It occurs at:
Code: Select all
spaceObject.OnAdditionToSpace(this);
Is it because EntityBase implements ISpaceObject.OnAdditionToSpace explicitly (and privately)? But then I don't get how it works ok for any other entities I have???? I'm clearly not understanding something, I'm just not sure what. Your help would be greatly appreciated as always.
Thanks.
CJ.

p.s. It's definitely caused by my overriding of OnAdditionToSpace in my CharacterController class because I don't get the error if I comment it out.