|
@@ -303,6 +303,7 @@ a| Everything you initialize and attach to the `rootNode` in the `simpleInitApp(
|
|
|
== How do I Transform Spatials?
|
|
|
|
|
|
There are three types of 3D transformation: Translation, Scaling, and Rotation.
|
|
|
+
|
|
|
[cols="55,15,15,15", options="header"]
|
|
|
|===
|
|
|
|
|
@@ -330,6 +331,7 @@ a|+up -down
|
|
|
a|+forward -backward
|
|
|
|
|
|
|===
|
|
|
+
|
|
|
[cols="55,15,15,15", options="header"]
|
|
|
|===
|
|
|
|
|
@@ -352,6 +354,7 @@ a|height
|
|
|
a|width
|
|
|
|
|
|
|===
|
|
|
+
|
|
|
[cols="55,15,15,15", options="header"]
|
|
|
|===
|
|
|
|
|
@@ -371,8 +374,9 @@ Tip: If your game idea calls for a serious amount of rotations, it is worth look
|
|
|
|
|
|
[source,java]
|
|
|
----
|
|
|
-thing.setLocalRotation(
|
|
|
- new Quaternion().fromAngleAxis(180*FastMath.DEG_TO_RAD, new Vector3f(1,0,0)));
|
|
|
+thing.setLocalRotation( new Quaternion().
|
|
|
+ fromAngleAxis(180*FastMath.DEG_TO_RAD,
|
|
|
+ new Vector3f(1,0,0)));
|
|
|
----
|
|
|
|
|
|
a|nodding your head
|