Method MatchOriginUpCameraForward
MatchOriginUpCameraForward(Vector3, Vector3)
This function will rotate the XR Origin object around the camera object using the destinationUp
vector such that:
- The camera will look at the area in the direction of the
destinationForward
- The projection of camera's forward vector on the plane with the normal
destinationUp
will be in the direction ofdestinationForward
- The up vector of the XR Origin object will match the provided
destinationUp
vector (note that the camera's Up vector can not be manipulated)
Declaration
public bool MatchOriginUpCameraForward(Vector3 destinationUp, Vector3 destinationForward)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | destinationUp | The up vector that the origin's up vector will be matched to. |
Vector3 | destinationForward | The forward vector that will be matched to the projection of the camera's forward vector on the plane with the normal |
Returns
Type | Description |
---|---|
bool | Returns true if the rotation is performed. Otherwise, returns false. |