VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
void AVR.Motion.AVR_TurnProvider.Update ( )
inlineprivate

Definition at line 66 of file AVR_TurnProvider.cs.

67  {
68 #if AVR_NET
69  if (IsOnline && !IsOwner) return;
70 #endif
71 
72  // Snap turn triggered
74  stime = Time.time; // Restart cooldown timer
75  // Turn left
77  playerRig.transform.Rotate(Vector3.up, -snp_rotationAmount, Space.Self);
78  // Turn right
80  playerRig.transform.Rotate(Vector3.up, snp_rotationAmount, Space.Self);
81  }
82 
84  // Turn left
86  playerRig.transform.Rotate(Vector3.up, -smt_rotationSpeed * Time.deltaTime, Space.Self);
87  // Turn right
89  playerRig.transform.Rotate(Vector3.up, smt_rotationSpeed * Time.deltaTime, Space.Self);
90  }
91  }
AVR_ControllerInputManager inputManager
the AVR_ControllerInputManager assigned to this controller. Returns null if no inputmanager is assign...
float smt_rotationSpeed
If the mode is set to smooth, this determines the speed of rotation (id deg/s)
turnMode
Mode of turning. Snap will instantly turn by a given amount while smooth is a continous turn over tim...
turnMode mode
Mode of turning. Snap will instantly turn by a given amount while smooth is a continous turn over tim...
float snp_cooldown
If the mode is set to snap, this determines the amount of time (in seconds) that has to pass between ...
bool getEventStatus(BoolEvent type)
Returns the status of a given BoolEvent
AVR_ControllerInputManager.FloatEvent turnDirection
Float value that determines the direction of the turn.
float snp_rotationAmount
If the mode is set to snap, the amount of rotation (in degrees) is determined by this value ...
AVR_ControllerInputManager.BoolEvent turnEvent
Event on which a turn is performed.