|
@@ -56,6 +56,12 @@ public class JumpPad : UdonSharpBehaviour
|
|
|
appliedVelocity = CalculateInitialVelocity(self.position, jumpTarget.position, -9.8f, arcTime);
|
|
appliedVelocity = CalculateInitialVelocity(self.position, jumpTarget.position, -9.8f, arcTime);
|
|
|
launchAnim.SetBool(animName, true);
|
|
launchAnim.SetBool(animName, true);
|
|
|
if (debug) Debug.Log("Jump Pad Controller: Animator State attempted to be set to True");
|
|
if (debug) Debug.Log("Jump Pad Controller: Animator State attempted to be set to True");
|
|
|
|
|
+ // Remote players get launched by their own client, and speed/velocity calls on them throw and halt this script
|
|
|
|
|
+ if (!colidedPlayer.isLocal)
|
|
|
|
|
+ {
|
|
|
|
|
+ SendCustomEventDelayedSeconds(nameof(EndLaunchAnim), arcTime-0.2f);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
player = colidedPlayer;
|
|
player = colidedPlayer;
|
|
|
// Get speeds to reinstate after jump imobilization
|
|
// Get speeds to reinstate after jump imobilization
|
|
|
defaultRun = player.GetRunSpeed();
|
|
defaultRun = player.GetRunSpeed();
|
|
@@ -95,6 +101,10 @@ public class JumpPad : UdonSharpBehaviour
|
|
|
player.SetRunSpeed(defaultRun);
|
|
player.SetRunSpeed(defaultRun);
|
|
|
player.SetStrafeSpeed(defaultStrafe);
|
|
player.SetStrafeSpeed(defaultStrafe);
|
|
|
if (debug) Debug.Log("Jump Pad Controller: De-Limited Player Mobility after" + arcTime.ToString() + " seconds");
|
|
if (debug) Debug.Log("Jump Pad Controller: De-Limited Player Mobility after" + arcTime.ToString() + " seconds");
|
|
|
|
|
+ EndLaunchAnim();
|
|
|
|
|
+ }
|
|
|
|
|
+ public void EndLaunchAnim()
|
|
|
|
|
+ {
|
|
|
launchAnim.SetBool(animName,false);
|
|
launchAnim.SetBool(animName,false);
|
|
|
if (debug) Debug.Log("Jump Pad Controller: Animator State attempted to be set to False");
|
|
if (debug) Debug.Log("Jump Pad Controller: Animator State attempted to be set to False");
|
|
|
}
|
|
}
|