Tubulii
16-03-2010 17:46:59
Hi,
I've tried to make a third-person-camera, they movement works, but the roation of the player is ... difficult.
I want to rotate a scenenode instead of the camera(which is the child of the scenenode).
I have this code for a FPC:
Camera.Yaw(e.state.X.rel * -ROTATE)
Camera.Pitch(e.state.Y.rel * -ROTATE)
but if i change it to this...
CameraBaseNode.Yaw(e.state.X.rel * -ROTATE)
CameraBaseNode.Pitch(e.state.Y.rel * -ROTATE)
... the camera gets crooked.
Any idea to fix this?
I've tried to make a third-person-camera, they movement works, but the roation of the player is ... difficult.
I want to rotate a scenenode instead of the camera(which is the child of the scenenode).
I have this code for a FPC:
Camera.Yaw(e.state.X.rel * -ROTATE)
Camera.Pitch(e.state.Y.rel * -ROTATE)
but if i change it to this...
CameraBaseNode.Yaw(e.state.X.rel * -ROTATE)
CameraBaseNode.Pitch(e.state.Y.rel * -ROTATE)
... the camera gets crooked.
Any idea to fix this?