Raised This Month: $51 Target: $400
 12% 

MotionController doesn't work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 01-07-2015 , 11:16   MotionController doesn't work
Reply With Quote #1

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->AttachObjectobjfalse ); 
PHP Code:
class CMotorController : public IMotionEvent
{
public:
    
IMotionEvent::simresult_e SimulateIPhysicsMotionController *pControllerIPhysicsObject *pObjectfloat deltaTimeVector &linearAngularImpulse &angular ) {
        return 
SIM_NOTHING;
    }

But my server crashes before simulation beginning. All the pointers are correct

Last edited by kadet.89; 01-07-2015 at 11:17.
kadet.89 is offline
Send a message via Skype™ to kadet.89
donrevan
AlliedModders Donor
Join Date: Jul 2010
Old 01-07-2015 , 11:44   Re: MotionController doesn't work
Reply With Quote #2

This is too specific. We don't have enough info to help. Try debugging the crash.
donrevan is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 01-07-2015 , 13:10   Re: MotionController doesn't work
Reply With Quote #3

i've made m_motor global and it doesn't crash anymore.

Last edited by kadet.89; 01-07-2015 at 14:19.
kadet.89 is offline
Send a message via Skype™ to kadet.89
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode