Page 1 of 1

Help finding exact rotation of model needed...

Posted: Sun Nov 16, 2008 4:19 am
by jhend60
Is there any tool available to find the exact rotation you need of an object? I have a gun I am trying to use in an fps, and I cannot turn the gun to the correct rotation. I need a tool to allow me to rotate it in real time, and return the exact rotation value. I guess this value would need to be relative to the camera's rotation as well. Could someone please give me some tips related to this?

Posted: Sun Nov 16, 2008 4:23 am
by jontan6
getRotation()

No

Posted: Sun Nov 16, 2008 10:08 am
by jhend60
I need something that can visually, and in real time, change an objects rotation of the mesh until I see fit, and then give me the rotation values.

Posted: Sun Nov 16, 2008 12:09 pm
by jontan6
i think it will involve several steps, several matrix multiplication.

something like:
translate by negative cam position
rotate by negative cam rotation

then get the rotation value

Posted: Sun Nov 16, 2008 7:09 pm
by rogerborg
I'd suggest taking a look at vector3df::getHorizontalAngle(). If that doesn't look like it'll do what you want, then can you please try explaining again what you want to do, using a short, concise description of your goal at each discrete step in the process.

Posted: Sun Nov 16, 2008 8:28 pm
by Acki
he simply wants to know how to determine the rotation and position of a node for placing it in the scene where he wants it to be placed... :lol:

I suggest to use an editor, e.g. irrEd or a 3d editor like Blender... ;)