public static void SetGravityStrength(VRCPlayerApi player, float gravity) { if (!player.isLocal) { return; } player.GetPlayerController().SetGravityStrength(gravity); }
public static void SetJumpImpulse(VRCPlayerApi player, float jump) { if (!player.isLocal) { return; } player.GetPlayerController().SetJump(jump); }
public static float GetGravityStrength(VRCPlayerApi player) { if (!player.isLocal) { return(0); } return(player.GetPlayerController().GetGravityStrength()); }
public static float GetJumpImpulse(VRCPlayerApi player) { if (!player.isLocal) { return(0); } return(player.GetPlayerController().GetJump()); }
public static void SetWalkSpeed(VRCPlayerApi player, float speed) { if (!player.isLocal) { return; } player.GetPlayerController().SetWalkSpeed(speed); }
public static float GetWalkSpeed(VRCPlayerApi player) { if (!player.isLocal) { return(0); } return(player.GetPlayerController().GetWalkSpeed()); }
public static bool IsGrounded(VRCPlayerApi player) { if (!player.isLocal) { return(false); } return(player.GetPlayerController().IsGrounded()); }
public static void UseLegacyLocomotion(VRCPlayerApi player) { if (!player.isLocal) { return; } player.GetPlayerController().UseLegacyLocomotion(); }
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); }
public static void SetVelocity(VRCPlayerApi player, Vector3 velocity) { if (!player.isLocal) { return; } player.GetPlayerController().SetVelocity(velocity); }
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); }
public static Vector3 GetVelocity(VRCPlayerApi player) { if (!player.isLocal) { return(Vector3.zero); } return(player.GetPlayerController().GetVelocity()); }
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); }
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()); }
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); }
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()); }
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()); }
public static void TeleportTo(VRCPlayerApi player, Vector3 position, Quaternion rotation) { if (!player.isLocal) { return; } player.GetPlayerController().Teleport(position, rotation, false); }
public static bool IsGrounded(VRCPlayerApi player) { if (!player.isLocal) { // TODO verify remote player values when not grounded. return(true); } return(player.GetPlayerController().IsGrounded()); }
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); }
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); }
public static VRC_Pickup GetPickupInHand(VRCPlayerApi player, VRC_Pickup.PickupHand hand) { return(player.GetPlayerController().GetHeldPickup(hand)); }
public static VRCPlayerApi.TrackingData GetTrackingData(VRCPlayerApi player, VRCPlayerApi.TrackingDataType trackingDataType) { return(player.GetPlayerController().GetTrackingData(trackingDataType)); }