Quat.LookDir
static Quat LookDir(Vec3 direction)
Creates a rotation that describes looking towards a direction. This is great for quickly describing facing behavior! This rotation works best when applied to objects that face Vec3.Forward in their resting/model space pose.
Vec3 direction | Direction the rotation should be looking. Doesn’t need to be normalized. |
RETURNS: Quat | A rotation that describes looking towards a direction. |
static Quat LookDir(float x, float y, float z)
Creates a rotation that describes looking towards a direction. This is great for quickly describing facing behavior! This rotation works best when applied to objects that face Vec3.Forward in their resting/model space pose.
float x | X component of the direction the rotation should be looking. Doesn’t need to be normalized. |
float y | Y component of the direction the rotation should be looking. Doesn’t need to be normalized. |
float z | Z component of the direction the rotation should be looking. Doesn’t need to be normalized. |
RETURNS: Quat | A rotation that describes looking towards a direction. |
Found an issue with these docs, or have some additional questions? Create an Issue on Github!