VectorExtensionsΒΆ

class VectorExtensions : System.Object

These extension methods provide additional functionality to vector classes.

public Quaternion CreateLookQuaternion(Vector3 originalDirection, Vector3 targetDirection, Vector3 up)

Creates a Quaternion representing the rotation to look from the original direction vector to the target direction vector.

Parameters:
  • originalDirection (Microsoft.Xna.Framework.Vector3) – The original direction vector.
  • targetDirection (Microsoft.Xna.Framework.Vector3) – The target direction vector.
  • up (Microsoft.Xna.Framework.Vector3) – The up vector.
Returns:

A quaternion representing the rotation.