Method GetDesiredForwardDirection
GetDesiredForwardDirection(float3, float3)
Converts a world space vector into a relative vector w.r.t. the current main camera.
Declaration
public static float3 GetDesiredForwardDirection(float3 absoluteLinearVelocity, float3 forwardDirection)
Parameters
Type | Name | Description |
---|---|---|
float3 | absoluteLinearVelocity | The world space vector to be converted. |
float3 | forwardDirection | The default forward direction, used if the linear velocity is zero. |
Returns
Type | Description |
---|---|
float3 | The converted view-direction relative vector. |
GetDesiredForwardDirection(float3, float3, float3)
Converts a world space vector into a relative vector.
Declaration
public static float3 GetDesiredForwardDirection(float3 absoluteLinearVelocity, float3 forwardDirection, float3 cameraForward)
Parameters
Type | Name | Description |
---|---|---|
float3 | absoluteLinearVelocity | The world space vector to be converted. |
float3 | forwardDirection | The default forward direction, used if the linear velocity is zero. |
float3 | cameraForward | The view direction to be used for the conversion. |
Returns
Type | Description |
---|---|
float3 | The converted view-direction relative vector. |