MCPcopy
hub / github.com/g3n/engine / SetRotationZ

Method SetRotationZ

core/node.go:597–606  ·  view source on GitHub ↗

SetRotationZ sets the global Z rotation to the specified angle in radians.

(z float32)

Source from the content-addressed store, hash-verified

595
596// SetRotationZ sets the global Z rotation to the specified angle in radians.
597func (n *Node) SetRotationZ(z float32) {
598
599 if n.rotNeedsUpdate {
600 n.rotation.SetFromQuaternion(&n.quaternion)
601 n.rotNeedsUpdate = false
602 }
603 n.rotation.Z = z
604 n.quaternion.SetFromEuler(&n.rotation)
605 n.matNeedsUpdate = true
606}
607
608// Rotation returns the current global rotation in Euler angles (radians).
609func (n *Node) Rotation() math32.Vector3 {

Callers

nothing calls this directly

Calls 2

SetFromQuaternionMethod · 0.80
SetFromEulerMethod · 0.80

Tested by

no test coverage detected