Share

Matrix.SetToRotateTo Method

Parent Object: Matrix

Description

Sets to the matrix of rotation that would align the 'from' vector with the 'to' vector. The optional Axis argument may be used when the two vectors are parallel and in opposite directions to specify a specific solution, but is otherwise ignored.

Remarks

Although the last argument is optional, a NULL (Nothing for VB users) must be passed in if the user wishes to ignore the argument.

Syntax

Matrix.SetToRotateTo( From As Vector, To As Vector, [Axis] As Vector )

Parameters

Name Type Description
From Vector Input Vector object to align from.
To Vector Input Vector object to align to.
Axis Vector Input Vector object.

This is an optional argument whose default value is 0.

Version

Introduced in version 4

Was this information helpful?