Jump to content

Rotate Sun to set the morning view, afternoon view, and night view


photo

Recommended Posts

Hello @Dentaawp,

You can set the rotation of any node by means of the SetRotation(quat q) method:

vec3 EulerAngles = vec3.ZERO;
mat4 rot = MathLib.ComposeRotationXYZ(EulerAngles);
node.SetWorldRotation(new quat(rot));

I'd also suggest to take a look at the Transformation section of the C# Component Samples to get familiar with rotation composition/decomposition. The Programming Quick Start series also might help with basic concepts.

Thanks!

Link to comment
×
×
  • Create New...