MCPcopy Index your code
hub / github.com/g3n/engine / SetRotation

Method SetRotation

core/node.go:550–555  ·  view source on GitHub ↗

SetRotation sets the global rotation in Euler angles (radians).

(x, y, z float32)

Source from the content-addressed store, hash-verified

548
549// SetRotation sets the global rotation in Euler angles (radians).
550func (n *Node) SetRotation(x, y, z float32) {
551
552 n.rotation.Set(x, y, z)
553 n.quaternion.SetFromEuler(&n.rotation)
554 n.matNeedsUpdate = true
555}
556
557// SetRotationVec sets the global rotation in Euler angles (radians) based on the specified vector pointer.
558func (n *Node) SetRotationVec(vrot *math32.Vector3) {

Callers 1

UpdateMethod · 0.80

Calls 2

SetFromEulerMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected