Rotating A 3D Model

Rotating A 3D Model

You are here:
← All Topics

You can rotate a 3D model by using the “turn” command:

d is a dragon
d.turn left 360 in 10 seconds

This will rotate the dragon to the left 360 degrees in 10 seconds. You can turn it to “right“, “forward” and “backward” as well.
You can also roll (rotate around the Z axis) your model either to the left or to the right:

d is a dragon
d.roll left 360 in 10 seconds

If you fill more comfortable rotating around the X,Y or Z axes, you can simply use them with the rotate command:

d is a dragon
d.rotate(y+360) in 10 seconds

This is equivalent to: d.turn left 360 in 10 seconds.
And, the following code:

d is a dragon
d.rotate(z+360) in 10 seconds

Is equivalent to: d.roll right 360 in 10 seconds

Previous Responding To User Interaction
Next Show 3D Model Axes