Help finding exact rotation of model needed...

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
jhend60
Posts: 44
Joined: Mon Oct 27, 2008 10:11 am
Location: behind you
Contact:

Help finding exact rotation of model needed...

Post 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?
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

getRotation()
jhend60
Posts: 44
Joined: Mon Oct 27, 2008 10:11 am
Location: behind you
Contact:

No

Post 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.
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post 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
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post 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.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post 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... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply