Struct Facing
Controls how visuals are oriented, e.g. the normal/up/facing
vector of a circle.
For convenience any of the following can be used directly anywhere a
Facing value is expected:
public struct Facing
Constructors
Facing(FacingMode, float3, float)
public Facing(FacingMode mode, float3 axis, float rotation)
Parameters
modeFacingModeaxisfloat3rotationfloat
Facing(float3, float)
Fields
Camera
The facing/up vector will automatically face the camera based on the individual visual's position.
public static readonly Facing Camera
Field Value
Global
The facing/up vector will be inherited from the global default.
public static readonly Facing Global
Field Value
axis
mode
rotation
Methods
GlobalOrCamera()
Resolve(float3)
If mode is Camera, cameraDirection will
be returned, otherwise returns the explicitly set direction.
public float3 Resolve(float3 cameraDirection)
Parameters
cameraDirectionfloat3
Returns
SetFrom(Facing)
Handles automatically setting the facing value in the case that from
is Global.
public void SetFrom(Facing from)
Parameters
fromFacing
ToCamera()
Changes this Facing to Camera, without altering its value.
public void ToCamera()
ToGlobal()
Changes this Facing to Global, without altering its value.
public void ToGlobal()
ToString()
ToValue()
Changes this Facing to Value, without altering its value.
public void ToValue()
WithRotation(float)
Returns a copy of this Facing with the given rotation.
public readonly Facing WithRotation(float angle)
Parameters
anglefloat