getWorldDirection method

Vector3 getWorldDirection(
  1. Vector3 result
)

Computes the current direction (forward) vector of this game entity in world space and stores the result in the given vector.

Implementation

Vector3 getWorldDirection(Vector3 result ) {
	quaternionWorld.extractRotationFromMatrix( worldMatrix() );
	return result.copy( forward ).applyRotation( quaternionWorld ).normalize();
}