[SOLVED] Struggling with addforce


Recommended Posts

Hi ,
I am trying to make a space ship controller and am kinda lost on how to add force to a node. Either i am making a silly mistake or I have lost my common sense :( . I have implemented a Component which adds force to the parent rigid body with respect to the node . I add it as a property to a child dummy node  of the ship .  The problem is . Its not working as i expected it work. The direction is not updating in the child nodes . Please help 
I have attached the source file for adding the force . My setup is simple . i have a main object with rigid body and multiple child dummy nodes with the thruster component for different thruster (yaw, pitch, roll .. etc) . i control them by enabling and disabling the property when given input key pressed. 


Thruster.cpp Thruster.h

Edited by SaltyWeevil
Link to post

Found the solution at last . it works as expected now . My bad . I missed the addWorldForce. I tried it with applying the force using world transform and it just worked . The updated files for thrusters is attached. 

Thruster.cpp Thruster.h

  • Like 1
Link to post
  • silent changed the title to [SOLVED] Struggling with addforce