As far as direction goes, myObject.sceneTransform.forward should actually contains a normalized orientation vector of the object in world space.
Alternatively, myObject.transform.forward should represent the normalized orientation vector in object space. -b On Feb 7, 11:57 am, Li <[email protected]> wrote: > Fabrice just mentioned something interesting to me... > > If you normalize the rotations of an object you might get the direction > versor for it...? > > Try it out, it could work, it would be something like this: > > var rots:Number3D = new Number3D(obj.rotationX, obj.rotationY, > obj.rotationZ); > rots.normalize(); > > On Sat, Feb 7, 2009 at 2:41 PM, Li <[email protected]> wrote: > > Patrick, > > > As ben said, if the "direction" vector you are referring to is -where the > > object is pointing towards- and when you are moving the objects you are > > making sure that the objects look in the direction of the motion, you are > > talking about the velocity vector of the objects, which is the derivative of > > the object's position in time. > > > I guess you could obtain this by analyzing the objects current position > > with it's previous one and obtaining a differential vector, or you could > > also do something with the object's rotationX, Y and Z values to extract the > > information from there... > > > On Sat, Feb 7, 2009 at 8:19 AM, ben <[email protected]> wrote: > > >> Hi ! > >> by "direction", do you want the angle to the point the object is > >> looking at, > >> or do you mean the vector of it's movement. > > >> If (your question == the second) > >> how do you manage object's movement ? > >> This can help you find it if you can get each step position of the > >> object. > > >> >"This describes the absolute position in the coordinate system as well > >> as the vector starting at [0,0,0] and ending at the Number3D. " > >> your right but you have to normalize it if you want to use it.
