I'm trying to add a motion contriller to my entity:
PHP Code:
CMotorController m_motor;
IPhysicsMotionController *m_pController = physenv->CreateMotionController( &m_motor );
m_pController->AttachObject( obj, false );
PHP Code:
class CMotorController : public IMotionEvent
{
public:
IMotionEvent::simresult_e Simulate( IPhysicsMotionController *pController, IPhysicsObject *pObject, float deltaTime, Vector &linear, AngularImpulse &angular ) {
return SIM_NOTHING;
}
}
But my server crashes before simulation beginning. All the pointers are correct