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

Method SetRotationY

core/node.go:585–594  ·  view source on GitHub ↗

SetRotationY sets the global Y rotation to the specified angle in radians.

(y float32)

Source from the content-addressed store, hash-verified

583
584// SetRotationY sets the global Y rotation to the specified angle in radians.
585func (n *Node) SetRotationY(y float32) {
586
587 if n.rotNeedsUpdate {
588 n.rotation.SetFromQuaternion(&n.quaternion)
589 n.rotNeedsUpdate = false
590 }
591 n.rotation.Y = y
592 n.quaternion.SetFromEuler(&n.rotation)
593 n.matNeedsUpdate = true
594}
595
596// SetRotationZ sets the global Z rotation to the specified angle in radians.
597func (n *Node) SetRotationZ(z float32) {

Callers

nothing calls this directly

Calls 2

SetFromQuaternionMethod · 0.80
SetFromEulerMethod · 0.80

Tested by

no test coverage detected