I want to create a simple demo use 3rd person camera, and I use a very simple method:
1. Create playerNode
2. Create cameraNode as the child of playerNode. So when I move the playerNode, the camera can move without coding.
3. And I use follow code to do roll and pitch work:
Code: Select all
mCamNode->yaw(Degree(-mRotate * e.state.X.rel), Node::TS_PARENT); mCamNode->pitch(Degree(-mRotate * e.state.Y.rel), Node::TS_LOCAL);
I'm still a new bird, can anyone give me a direction?