Class QuaternionUtil
- Namespace
- Stride.CommunityToolkit.Mathematics
- Assembly
- Stride.CommunityToolkit.dll
Rotations that Quaternion does not build directly.
public static class QuaternionUtil
- Inheritance
-
QuaternionUtil
Methods
LookAt(Vector3, Vector3, Vector3?)
The rotation of something at eye that looks at target, the way a camera
does: down its own -Z, with up kept upwards so it does not roll. A chase camera, a turret,
a fixed camera aimed at a point.
public static Quaternion LookAt(Vector3 eye, Vector3 target, Vector3? up = null)
Parameters
Returns
- Quaternion
The rotation, for a transform's
Rotation.
Remarks
Undefined when the two points coincide or the line between them runs along up, as any
look-at is. The same construction as Matrix.LookAtRH, inverted: a view matrix looks down -Z, so its
inverse is the pose of the thing that looks.