Method MatchOriginUpOriginForward
MatchOriginUpOriginForward(Vector3, Vector3)
This function will rotate the XR Origin object around the camera object using the destinationUp
vector such that:
- The forward vector of the XR Origin object, which is the direction the player moves in Unity when walking forward in the physical world, will match the provided
destinationUp
vector - The up vector of the XR Origin object will match the provided
destinationUp
vector
Declaration
public bool MatchOriginUpOriginForward(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 forward vector of the XR Origin object, which is the direction the player moves in Unity when walking forward in the physical world. |
Returns
Type | Description |
---|---|
bool | Returns true if the rotation is performed. Otherwise, returns false. |