3rd person camera problem

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Posts: 1
Joined: Wed Aug 12, 2009 7:56 am

3rd person camera problem

Post by gnuesr » Sun Aug 16, 2009 5:22 pm

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);
Now, I create a plane to walk, but how to limit the pitch do not drill through the plane??

I'm still a new bird, can anyone give me a direction? :)
0 x

User avatar
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1

Re: 3rd person camera problem

Post by Kencho » Sun Aug 16, 2009 5:56 pm

This has been answered here a million times. Please, use the search first :)
0 x

Post Reply