About Store Forum Documentation Contact



Post Reply 
Problems with Up Vector
Author Message
Kevin Offline
Member

Post: #1
Problems with Up Vector
Hi,
I want to change the camera behaviour a bit. I have a first person camera attached to the head point of my player`s skeleton.
If I move forward and right at once the camera get sloped a bit, and this is what I want to prevent.
So I thought about to change the Up vector of the camera in some way.
This is my current Cam update:

Code:
OrientP& head = Players[0].cskel.getPoint("head");
Cam.setPosDir(head.pos,head.dir,head.perp).set().updateVelocities();

But I don't have a clue how to transform the up-vector...
Any idea?
12-14-2009 10:53 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Problems with Up Vector
try something like this:

OrientP temp=head;
temp.perp.y+=1;
temp.fixPerp();

Cam.setPosDir(temp.....
12-14-2009 11:48 PM
Find all posts by this user Quote this message in a reply
Post Reply