www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: gamenewer on October 20, 2014, 11:19:10 am
-
Maybe this question is very simple, but i don't know how to do so , forgive me
-
I don't get the question... ???
-
I get a matrix from a vector , I only want to rotate my car by Y and Z , so I must set the X angle to 0 , but I don't know how to set x angle to 0
-
By setting the x-component of the vector to 0 in the first place?
-
Wow, I perform an lookat action, I get the SimpleVector from a curve , and get this SimpleVector matrix , then set the car by this matrix ,
SimpleVector posAhead = way.PointOnPath(xp);
SimpleVector poscur = getTransformedCenter();
posAhead.sub(poscur);
rotMatrix=posAhead.getRotationMatrix();
//here must set X angle to 0
???? setXangle = 0 ???
//
setRotationMatrix(rotMatrix);
-
posAhead.x=0!?
-
if I set posAhead.x=0 , the car will rotate very strange and not perform a lookat action, So it's not right
-
My bad...i actually meant to 0 y, not x.
-
You are greate ! set Y = 0 it's OK ! :)