Get RAPTOR

IRaptorLocalPlayer

Lets Logic use your own character as the player.

NamespaceAssemblyKindStability
Raptor.ComponentsRaptor.Componentsinterfacepreview, since 0.1.0

Implement it on your character and register it with RaptorLocalPlayers.Register. Without it, Logic finds the player by the Player tag or the main camera, and cannot lock its input.

public interface IRaptorLocalPlayer

Properties

Eye

Camera Eye { get; }

The player's camera, or null if it has none.

Logic reads it whenever it needs the player's view, for example to aim at a button or shake the view.

InputLocked

bool InputLocked { get; set; }

Whether the character ignores move, look and jump input. Gravity still applies.

Logic sets it to true while the player is dead or frozen, and back to false afterwards.

Root

Transform Root { get; }

The player's root transform. Its position is the feet.

Logic reads it whenever it needs the player's position.

Methods

Teleport

void Teleport(Vector3 feet, float yawDegrees)

Moves the player so its feet are at feet, facing yawDegrees. A yaw of 0 faces +Z and 90 faces +X. The player keeps no velocity from before the move.

ParameterTypeDescription
feetVector3World position of the feet.
yawDegreesfloatFacing after the move, in degrees around world up.

Called on the main thread.