class FoxObject
package foxlite
extends FoxBasic
extended by FlxFox3DSprite, FoxDirectionalSound, FoxObjectGroup, FoxBaseLight, FoxBone, FoxCamera, FoxModel
Constructor
Variables
parent:FoxObject
If set, will adapt parent transform. Make sure the parent has a higher priority so it updates in order
rotationOrder:EulerOrder = EulerOrder.ZYX
This controls the way this object is rotated (via rotation)
The rotation is applied per-axis sequentially, meaning the way one axis rotate can influence the next rotation.
By default, the Z axis rotates first, this makes the object roll.
Then the Y axis is rotated next, this orients the rolled object horizontally, think of it as a swiveling floor fan.
And last, the X axis is rotated, this has the effect of tilting the Y rotation.
This is done in this order so there is no gimbal-lock when converting euler angles from quaternions. However, this order affects camera rotations.
Custom camera controllers should use ZXY order instead so no tilting occurs.
transform:Matrix3D = new Matrix3D()
This is the global transform for this Object, it encodes position, rotation and scale in a 4x4 matrix
Methods
getAngle(?output:Vector3D):Vector3D
Gets the object's rotation as degrees, as a Vector3D
Parameters:
output | (Optional) the output vector to store the angles without allocating a new one |
|---|
Returns:
a Vector3D containing angleX, angleY and angleZ
setRotationQuaternion(x:Float = 0, y:Float = 0, z:Float = 0, w:Float = 1):Vector3D
Sets the object's rotation from a Quaternion, which is needed for accurate rotation representation when interpolating.
How dows it work? hell if i know
copyComponentsFrom(object:FoxObject):Void
Copies position, rotation and scale from another FoxObject,
so the other object's components doesn't affect this one when changing them