BEPUutilities2.Matrix.CreateLookAt C# (CSharp) Method

CreateLookAt() public static method

Creates a view matrix pointing from a position to a target with the given up vector.
public static CreateLookAt ( Vector3 position, Vector3 target, Vector3 upVector ) : Matrix
position Vector3 Position of the camera.
target Vector3 Target of the camera.
upVector Vector3 Up vector of the camera.
return Matrix
        public static Matrix CreateLookAt(Vector3 position, Vector3 target, Vector3 upVector)
        {
            Matrix lookAt;
            var forward = target - position;
            CreateView(ref position, ref forward, ref upVector, out lookAt);
            return lookAt;
        }

Same methods

Matrix::CreateLookAt ( Vector3 &position, Vector3 &target, Vector3 &upVector, Matrix &viewMatrix ) : void