Hello again, I have another little problem to solve .
Code here:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
*.......
*other code here
*................... //Here is the code that generates the problem
dir= camera->getTarget() - camera->getPosition(); //I get the camera target
dir.normalize(); //Normalize the 3df verctor
totalSpeed[0]=dir.X; //Assign the vector values to the speed
totalSpeed[1]=dir.Y;
totalSpeed[2]=dir.Z;
nodeRotation =camera->getRotation(); //I rotate the Mesh .. etc
vNode->setRotation(nodeRotation);
NewtonBodySetVelocity(body,zeroForce); //Here I apply the speed to my object
*...
*other code here
*.........
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
So, I first get the target direction of my Irrlicht FPS camera, then i set a speed on the object to that direction and the object moves into that direction, quite simple
-------------------------------------------------------Problem----------------------------------------------------------------------------------------------------------------------------
The problem is that each time i rotate the camera with the mouse, as the new target values change, my object stops moving.
It is because the FPS camera in Irrlicht refreshes is such a way that it stops the Physics engine to work ?
* While the camera moves, the object doesn't move into the camera direction
* While the camera is not rotating, the object moves to the camera direction
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------