VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
void AVR.Motion.AVR_MovementProvider.CommenceTeleport ( Vector3  targetLocation)
inlineprivate

Begins a movement towards target location

Parameters
targetLocationFeet location we teleport/move to

Definition at line 162 of file AVR_MovementProvider.cs.

162  {
163  if(tp_in_progress) return;
164 
165  destination = targetLocation;
166 
167  switch(teleportMode) {
168  case TeleportModes.INSTANT : {
170  break;
171  }
172  case TeleportModes.FADE_COLOR : {
173  StartCoroutine(BlinkTeleport());
174  break;
175  }
176  case TeleportModes.DASH : {
177  dash_origin = playerRig.FeetInWorldSpace;
178  tp_in_progress = true;
179  dash_stime = Time.time;
180  break;
181  }
182  case TeleportModes.FADE_DASH : {
183  StartCoroutine(FadeDash());
184  break;
185  }
186  default : {
187  AVR_DevConsole.cwarn("The given teleportMode is not valid!", this);
188  break;
189  }
190  }
191  }
IEnumerator FadeDash()
This coroutine is exectued when a fade-dash-movement is performed.
TeleportModes teleportMode
Modes of teleportation/movement. INSTANT: Instantly moves to the target position FADE_COLOR: Fades th...
IEnumerator BlinkTeleport()
This coroutine is exectued when a blink-movement (INSTANT) is performed.