|
@@ -118,7 +118,7 @@ Every JME3 application has a rootNode: Your game automatically inherits the `roo
|
|
|
* A Spatial can be loaded, transformed, and saved.
|
|
* A Spatial can be loaded, transformed, and saved.
|
|
|
* There are two types of Spatials: Nodes and Geometries.
|
|
* There are two types of Spatials: Nodes and Geometries.
|
|
|
|
|
|
|
|
-[cols="3", options="header"]
|
|
|
|
|
|
|
+[cols="10,45,45", options="header"]
|
|
|
|===
|
|
|===
|
|
|
|
|
|
|
|
<a|
|
|
<a|
|
|
@@ -353,9 +353,9 @@ a|width
|
|
|
|===
|
|
|===
|
|
|
|
|
|
|
|
a| Rotation turns Spatials
|
|
a| Rotation turns Spatials
|
|
|
-a| X-axis
|
|
|
|
|
-a| Y-axis
|
|
|
|
|
-a| Z-axis
|
|
|
|
|
|
|
+a| X-axis (Pitch)
|
|
|
|
|
+a| Y-axis (Yaw)
|
|
|
|
|
+a| Z-axis (Roll)
|
|
|
|
|
|
|
|
a|3-D rotation is a bit tricky (<<jme3/rotate#,learn details here>>). In short: You can rotate around three axes: Pitch, yaw, and roll. You can specify angles in degrees by multiplying the degrees value with `FastMath.DEG_TO_RAD`. +
|
|
a|3-D rotation is a bit tricky (<<jme3/rotate#,learn details here>>). In short: You can rotate around three axes: Pitch, yaw, and roll. You can specify angles in degrees by multiplying the degrees value with `FastMath.DEG_TO_RAD`. +
|
|
|
To roll an object 180° around the z axis:
|
|
To roll an object 180° around the z axis:
|
|
@@ -372,9 +372,9 @@ thing.setLocalRotation(
|
|
|
new Quaternion().fromAngleAxis(180*FastMath.DEG_TO_RAD, new Vector3f(1,0,0)));
|
|
new Quaternion().fromAngleAxis(180*FastMath.DEG_TO_RAD, new Vector3f(1,0,0)));
|
|
|
----
|
|
----
|
|
|
|
|
|
|
|
-a|pitch = nodding your head
|
|
|
|
|
-a|yaw = shaking your head
|
|
|
|
|
-a|roll = cocking your head
|
|
|
|
|
|
|
+a|nodding your head
|
|
|
|
|
+a|shaking your head
|
|
|
|
|
+a|cocking your head
|
|
|
|
|
|
|
|
|===
|
|
|===
|
|
|
|
|
|