예제 #1
0
 public static void SetGravityStrength(VRCPlayerApi player, float gravity)
 {
     if (!player.isLocal)
     {
         return;
     }
     player.GetPlayerController().SetGravityStrength(gravity);
 }
예제 #2
0
 public static void SetJumpImpulse(VRCPlayerApi player, float jump)
 {
     if (!player.isLocal)
     {
         return;
     }
     player.GetPlayerController().SetJump(jump);
 }
예제 #3
0
 public static float GetGravityStrength(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         return(0);
     }
     return(player.GetPlayerController().GetGravityStrength());
 }
예제 #4
0
 public static float GetJumpImpulse(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         return(0);
     }
     return(player.GetPlayerController().GetJump());
 }
예제 #5
0
 public static void SetWalkSpeed(VRCPlayerApi player, float speed)
 {
     if (!player.isLocal)
     {
         return;
     }
     player.GetPlayerController().SetWalkSpeed(speed);
 }
예제 #6
0
 public static float GetWalkSpeed(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         return(0);
     }
     return(player.GetPlayerController().GetWalkSpeed());
 }
예제 #7
0
 public static bool IsGrounded(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         return(false);
     }
     return(player.GetPlayerController().IsGrounded());
 }
예제 #8
0
 public static void UseLegacyLocomotion(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         return;
     }
     player.GetPlayerController().UseLegacyLocomotion();
 }
예제 #9
0
 public static void TeleportToOrientation(VRCPlayerApi player, Vector3 position, Quaternion rotation, VRC_SceneDescriptor.SpawnOrientation orientation)
 {
     if (!player.isLocal)
     {
         return;
     }
     player.GetPlayerController().Teleport(position, rotation, orientation == VRC_SceneDescriptor.SpawnOrientation.AlignRoomWithSpawnPoint);
 }
예제 #10
0
 public static void SetVelocity(VRCPlayerApi player, Vector3 velocity)
 {
     if (!player.isLocal)
     {
         return;
     }
     player.GetPlayerController().SetVelocity(velocity);
 }
예제 #11
0
 public static void SetGravityStrength(VRCPlayerApi player, float gravity)
 {
     if (!player.isLocal)
     {
         throw new Exception("[VRCPlayerAPI.SetGravityStrength] You cannot set gravity strength for remote clients!");
     }
     player.GetPlayerController().SetGravityStrength(gravity);
 }
예제 #12
0
 public static Vector3 GetVelocity(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         return(Vector3.zero);
     }
     return(player.GetPlayerController().GetVelocity());
 }
예제 #13
0
 public static void SetJumpImpulse(VRCPlayerApi player, float jump)
 {
     if (!player.isLocal)
     {
         throw new Exception("[VRCPlayerAPI.SetJumpImpulse] You cannot set jump impulse for remote clients!");
     }
     player.GetPlayerController().SetJump(jump);
 }
예제 #14
0
 public static float GetGravityStrength(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         throw new Exception("[VRCPlayerAPI.GetGravityStrength] You cannot get gravity strength for remote clients!");
     }
     return(player.GetPlayerController().GetGravityStrength());
 }
예제 #15
0
 public static void SetWalkSpeed(VRCPlayerApi player, float speed)
 {
     if (!player.isLocal)
     {
         throw new Exception("[VRCPlayerAPI.SetWalkSpeed] You cannot set walk speed for remote clients!");
     }
     player.GetPlayerController().SetWalkSpeed(speed);
 }
예제 #16
0
 public static float GetJumpImpulse(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         throw new Exception("[VRCPlayerAPI.GetJumpImpulse] You cannot get jump impulse for remote clients!");
     }
     return(player.GetPlayerController().GetJump());
 }
예제 #17
0
 public static float GetWalkSpeed(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         throw new Exception("[VRCPlayerAPI.GetWalkSpeed] You cannot get walk speed for remote clients!");
     }
     return(player.GetPlayerController().GetWalkSpeed());
 }
예제 #18
0
 public static void TeleportTo(VRCPlayerApi player, Vector3 position, Quaternion rotation)
 {
     if (!player.isLocal)
     {
         return;
     }
     player.GetPlayerController().Teleport(position, rotation, false);
 }
예제 #19
0
 public static bool IsGrounded(VRCPlayerApi player)
 {
     if (!player.isLocal)
     {
         // TODO verify remote player values when not grounded.
         return(true);
     }
     return(player.GetPlayerController().IsGrounded());
 }
예제 #20
0
        public static void Immobilize(VRCPlayerApi player, bool immobilized)
        {
            if (!player.isLocal)
            {
                throw new Exception("[VRCPlayerAPI.Immobilize] You cannot set remote players Immobilized");
            }

            player.GetPlayerController().Immobilize(immobilized);
        }
예제 #21
0
        public static void TeleportToOrientationLerp(VRCPlayerApi player, Vector3 position, Quaternion rotation, VRC_SceneDescriptor.SpawnOrientation orientation, bool lerp)
        {
            if (!player.isLocal)
            {
                player.LogWarning("[VRCPlayerAPI.TeleportTo] Teleporting remote players will do nothing.");
                return;
            }

            // Ignore lerp since there is no networking here
            player.GetPlayerController().Teleport(position, rotation, orientation == VRC_SceneDescriptor.SpawnOrientation.AlignRoomWithSpawnPoint);
        }
예제 #22
0
 public static VRC_Pickup GetPickupInHand(VRCPlayerApi player, VRC_Pickup.PickupHand hand)
 {
     return(player.GetPlayerController().GetHeldPickup(hand));
 }
예제 #23
0
 public static VRCPlayerApi.TrackingData GetTrackingData(VRCPlayerApi player, VRCPlayerApi.TrackingDataType trackingDataType)
 {
     return(player.GetPlayerController().GetTrackingData(trackingDataType));
 }