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

Method SetRotationX

core/node.go:573–582  ·  view source on GitHub ↗

SetRotationX sets the global X rotation to the specified angle in radians.

(x float32)

Source from the content-addressed store, hash-verified

571
572// SetRotationX sets the global X rotation to the specified angle in radians.
573func (n *Node) SetRotationX(x float32) {
574
575 if n.rotNeedsUpdate {
576 n.rotation.SetFromQuaternion(&n.quaternion)
577 n.rotNeedsUpdate = false
578 }
579 n.rotation.X = x
580 n.quaternion.SetFromEuler(&n.rotation)
581 n.matNeedsUpdate = true
582}
583
584// SetRotationY sets the global Y rotation to the specified angle in radians.
585func (n *Node) SetRotationY(y float32) {

Callers 1

NewSceneMethod · 0.95

Calls 2

SetFromQuaternionMethod · 0.80
SetFromEulerMethod · 0.80

Tested by

no test coverage detected