teleport
Call Signature
Section titled “Call Signature”teleport(
step,entity,options):Readonly<TeleportResult>
Places entity at a pose exactly, unswept, so it never stops short of a
target past a wall: a respawn, a portal, a return to a checkpoint. It
keeps its velocity unless keepVelocity is false, and a character
forgets the floor and the platform her last move carried. Where a
character’s capsule overlaps fixed or kinematic geometry at the target,
it is pushed out by the shortest way, up to her radius; still
overlapping, or for a body anywhere it overlaps, it stays, isClear is
false and it gains StuckTrait. Every page draws it there with no
glide: the call counts on TeleportTrait, which streams with the pose.
A kinematic body takes no target from an earlier moveAndSlide this
tick, so it pushes nothing on the way. In a predicted system the entity
is the PredictedEntity the step handed out, so a kill brick’s respawn
is instant on her page and re-runs exactly; elsewhere it takes the
room’s authority. As Unity’s Rigidbody.position, Godot’s
global_position and Unreal’s TeleportTo.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
step |
PredictedStep |
entity |
PredictedEntity |
options |
TeleportOptions |
Returns
Section titled “Returns”Readonly<TeleportResult>
Example
Section titled “Example”teleport(step, character, { position: spawnPoint, keepVelocity: false });Call Signature
Section titled “Call Signature”teleport(
authority,entity,options):Readonly<TeleportResult>
Places entity at a pose exactly, unswept, so it never stops short of a
target past a wall: a respawn, a portal, a return to a checkpoint. It
keeps its velocity unless keepVelocity is false, and a character
forgets the floor and the platform her last move carried. Where a
character’s capsule overlaps fixed or kinematic geometry at the target,
it is pushed out by the shortest way, up to her radius; still
overlapping, or for a body anywhere it overlaps, it stays, isClear is
false and it gains StuckTrait. Every page draws it there with no
glide: the call counts on TeleportTrait, which streams with the pose.
A kinematic body takes no target from an earlier moveAndSlide this
tick, so it pushes nothing on the way. In a predicted system the entity
is the PredictedEntity the step handed out, so a kill brick’s respawn
is instant on her page and re-runs exactly; elsewhere it takes the
room’s authority. As Unity’s Rigidbody.position, Godot’s
global_position and Unreal’s TeleportTo.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
EntityAuthority |
entity |
Entity |
options |
TeleportOptions |
Returns
Section titled “Returns”Readonly<TeleportResult>
Example
Section titled “Example”teleport(step, character, { position: spawnPoint, keepVelocity: false });