CVR.LocalPlayer
LocalPlayer API¶
Unlike the general Player API, the LocalPlayer API provides wrapped access to functions specific to the local player.
For Player related events please see Available Events - Player Events.
Static Members¶
Static Properties¶
| Signature | Description |
|---|---|
| Player PlayerObject { get; } | Returns the player object for the local player |
Static Methods¶
| Signature | Description |
|---|---|
| float GetPlaySpaceScale(); | Returns the current playspace scale factor |
| Vector3 GetPlaySpaceOffset(); | Returns the current playspace offset |
| Vector3 GetPosition(); | Returns the local player's world position |
| void SetPosition(Vector3 p); | Sets the local player's world position |
| Quaternion GetRotation(); | Returns the local player's world rotation |
| void SetRotation(Quaternion r); | Sets the local player's world rotation |
| void OffsetBy(Vector3 p); | Offsets the local player by a position |
| void MoveTo(Vector3 p); | Smoothly moves the local player to target |
| void SetImmobilized(bool v); | Locks or unlocks movement |