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

Method WorldDirection

core/node.go:803–809  ·  view source on GitHub ↗

WorldDirection updates the world matrix and sets the specified vector to the current world direction of this node.

(result *math32.Vector3)

Source from the content-addressed store, hash-verified

801// WorldDirection updates the world matrix and sets
802// the specified vector to the current world direction of this node.
803func (n *Node) WorldDirection(result *math32.Vector3) {
804
805 var quaternion math32.Quaternion
806 n.WorldQuaternion(&quaternion)
807 *result = n.direction
808 result.ApplyQuaternion(&quaternion)
809}
810
811// MatrixWorld returns a copy of the matrix world of this node.
812func (n *Node) MatrixWorld() math32.Matrix4 {

Callers 3

RenderMethod · 0.80
RenderMethod · 0.80
RenderSetupMethod · 0.80

Calls 2

WorldQuaternionMethod · 0.95
ApplyQuaternionMethod · 0.80

Tested by

no test coverage detected