SetRotationZ sets the global Z rotation to the specified angle in radians.
(z float32)
| 595 | |
| 596 | // SetRotationZ sets the global Z rotation to the specified angle in radians. |
| 597 | func (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). |
| 609 | func (n *Node) Rotation() math32.Vector3 { |
nothing calls this directly
no test coverage detected