I have always wondered why this function never existed and have wanted it on many occasions. It does the same as setLocalRotation(Quaternion) except does not require explicit creation of a Quaternion object. Also added that the order of rotations is: y, z, x.
[patch]
— Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -806,6 +806,23 @@
}
/**
-
* <code>setLocalRotation</code> sets the local rotation of this node<br />
-
* using euler angles. Note: the order of rotations will be: y, then z and then x<br />
-
*<br />
-
* @param xAngle<br />
-
* the Euler pitch of rotation (in radians)<br />
-
* @param yAngle<br />
-
* the Euler yaw of rotation (in radians)<br />
-
* @param zAngle<br />
-
* the Euler roll of rotation (in radians)<br />
-
*/<br />
- public void setLocalRotation(float xAngle, float yAngle, float zAngle) {
-
Quaternion quaternion = new Quaternion().fromAngles(xAngle, yAngle, zAngle);<br />
-
localTransform.setRotation(quaternion);<br />
-
setTransformRefresh();<br />
- }
+
- /**
- <code>getLocalScale</code> retrieves the local scale of this node.
*
-
@return the local scale of this node.
[/patch]