3rd Person Camera

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
User avatar
calsmurf2904
Orc
Posts: 401
Joined: Tue Sep 16, 2008 9:39 pm
Location: Netherlands

3rd Person Camera

Post by calsmurf2904 »

Hello,
I am trying to make a 3rd person camera.
The formule i am using is :

Code: Select all

Vector3 CamPos = Vector3(Player->getPosition().x+(sin(Roll)*30),Player->getPosition().y+20,Player->getPosition().z+(cos(Roll)*30));
mCamera->setPosition(CamPos);
mCamera->lookAt(Player->getPosition());
However this isn't working.
Could someone help me with this ?
(BTW Roll :

Code: Select all

Roll += 0.1
Player->yaw(0.1);
)
User avatar
crioto
Halfling
Posts: 59
Joined: Fri Aug 11, 2006 8:34 pm
Location: Bishkek, Kyrgyzstan
Contact:

Post by crioto »

There are very good article for 3rd person camera creating.
Do your work, don't be stupid
User avatar
calsmurf2904
Orc
Posts: 401
Joined: Tue Sep 16, 2008 9:39 pm
Location: Netherlands

Post by calsmurf2904 »

the problem with that tutorial is that it uses getWorldPosition wich isn't in Ogre 1.6 (From my understanding)
User avatar
xadhoom
Minaton
Posts: 973
Joined: Fri Dec 28, 2007 4:35 pm
Location: Germany
x 1

Post by xadhoom »

_getDerivedPosition() should work instead...
User avatar
calsmurf2904
Orc
Posts: 401
Joined: Tue Sep 16, 2008 9:39 pm
Location: Netherlands

Post by calsmurf2904 »

nvm...got it working without that tutorial
I used Blitz3D for a while and that has a Parent system and i figured out that Ogre3D has the same system....so i used that :P
Post Reply