VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
override void AVR.Motion.AVR_LocomotionProvider.Awake ( )
inlineprotectedvirtual

Reimplemented from AVR.Core.AVR_ControllerComponent.

Definition at line 83 of file AVR_LocomotionProvider.cs.

84  {
85  base.Awake();
86 
87  switch(dirAxes) {
88  case DirectionAxes.XY: { tF = (v) => new Vector3(v.x, v.y, 0); break; }
89  case DirectionAxes.XZ: { tF = (v) => new Vector3(v.x, 0, v.y); break; }
90  case DirectionAxes.YX: { tF = (v) => new Vector3(v.y, v.x, 0); break; }
91  case DirectionAxes.YZ: { tF = (v) => new Vector3(0, v.x, v.y); break; }
92  case DirectionAxes.ZX: { tF = (v) => new Vector3(v.y, 0, v.x); break; }
93  case DirectionAxes.ZY: { tF = (v) => new Vector3(0, v.y, v.x); break; }
94  default: { AVR_DevConsole.cwarn("The given DirectionAxes are invalid.", this); tF = (v) => new Vector3(v.x, v.y, 0); break; }
95  }
96 
98  }
DirectionAxes dirAxes
The input is given by a 2d vector from the controller (moveDirection), this value determines how this...
bool use_acceleration
If set to false, speed will be set instantly. If set to true, movement will accelerate over time...
float acceleration_constant
Determines the amount acceleration. 0 means no movement ever, 1 means instant acceleration.
System.Func< Vector2, Vector3 > tF