NodeWorld

IPlayerController

La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.

csharp
public interface IPlayerController

Namespace NodeWorld.SDK.Shared.

The local player's body as the rest of the game sees it: where it is, how it moves, teleports and freezing.

Properties

Position

csharp
Vector3 Position { get; }

World position of the player.

Rotation

csharp
Quaternion Rotation { get; }

World rotation of the player.

Forward

csharp
Vector3 Forward { get; }

The direction the player faces.

Velocity

csharp
Vector3 Velocity { get; }

The player's velocity, in meters per second.

IsGrounded

csharp
bool IsGrounded { get; }

The player stands on the ground.

IsFrozen

csharp
bool IsFrozen { get; }

The player is frozen.

MovementSpeed

csharp
float MovementSpeed { get; set; }

The player's walking speed, in meters per second.

Methods

TeleportTo

csharp
void TeleportTo(Vector3 position, Quaternion rotation)

Moves the player to position, facing rotation.

TeleportTilted

csharp
void TeleportTilted(Vector3 position, Quaternion rotation)

As TeleportTo, the play space tilted to rotation (a seat that pitches and rolls); TeleportTo sets it upright.

Freeze

csharp
void Freeze()

Stops the player until Unfreeze.

Unfreeze

csharp
void Unfreeze()

Lets the player move again.