Posts: 1,216
Threads: 59
Joined: Apr 2010
Reputation:
0
18.10.2011, 19:32
(
Последний раз редактировалось wups; 19.10.2011 в 12:15.
)
I've spent the whole evening trying to figure it out, but just can't come up with a formula. Could anyone help me, when Coordinates of two objects are known, X1rot and Z1rot are also known.
NEED: Y1Rot(to face object2)
Posts: 1,101
Threads: 21
Joined: Oct 2010
Reputation:
0
So what do you want ? Y Rotation of an object ?
GetObjectRot();
Posts: 1,101
Threads: 21
Joined: Oct 2010
Reputation:
0
Not possible I believe
Because the Y rotation can have ANY value independent from the X and Z rotation or the coordinated of the other object (Z axis needed here anyway)
Posts: 1,216
Threads: 59
Joined: Apr 2010
Reputation:
0
If you want it FACING another object, than it can't have any value, it does depend from x and z axis.
Posts: 2,262
Threads: 260
Joined: Mar 2009
Reputation:
0
It's the Z angle which needs working out, you need to work it out with some special formular which gets tangent, sin thing shit. Didn't really understand it, after hours of indentating + coding + testing. ********* and Me got there in the end.
Posts: 2,929
Threads: 160
Joined: Feb 2009
Reputation:
0
Search for Euler Angles. It should give you enough information to create this "function".