Component:CharacterTeleporter

From Resonite Wiki
Revision as of 18:47, 19 October 2024 by 989onan (talk | contribs) (add info, no longer stub)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Component image 
Character Teleporter component as seen in the Scene Inspector


The CharacterTeleporter sets up a Slot to teleport a character to the associated teleport exit when the Slot's Collider is hit. The Collider must be of type Trigger unless TriggersOnly is disabled.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
TriggersOnly Bool Whether to only allow triggers in this component's slot hiearchy to trigger the teleporter.
Exits list of Exit A list of slot exits to send the user to, which include rotation and individualized data.
MinimumVelocity Float the minimum velocity the user has to be traveling to enter the teleporter.
DirectionReference Float3 Which way is looking forward for this teleporter.
MaxDirectionAngle Float If the user's velocity direction has an angle greater than this compared to the DirectionReference, then don't teleport the user.
IgnoreParentUser Bool Whether to ignore the active user of this component when finding users that meet the criteria to go through the teleporter.
TeleportEntered direct SyncDelegateList`1<Action`1<Float3>> Sync Delegates that take Float3 that should be called when the teleporter is entered.
TeleportExited direct SyncDelegateList`1<Action`1<Float3>> Sync Delegates that take Float3 that should be called when the teleporter is exited anywhere.

Exit

Fields
Name Type Description
Weight Float The probability of coming out of this exit.
TeleportExit Slot The slot this exit will send the user to when this exit is chosen.
ParentAfterTeleport Bool Whether to parent the character controller slot under TeleportExit
TransformRotation Bool Whether to rotate the user to align this user to be pointing the same direction relative to this as they were pointing relative to the entrance.
TransformScale Bool Whether to scale the character controller to TeleportExit's scale relative to the entrance.
RelativeExitPoint Bool Whether this exit will put the user at the same relative position to it as the user was when they went into the entrance.
RandomExitPointGenerator IPointGenerator A generator for points the user should end up when exiting out of this exit. for example, teleporting users into a circle area after they exit here. Only works if RelativeExitPoint is false.
TeleportExitVelocity Nullable`1<Float3> What velocity to set the user to when they exit out of this exit.
TeleportExited direct SyncDelegateList`1<Action`1<Float3>> Sync Delegates that take Float3 that should be called when the teleporter is exited here.


Usage

Place the component on a slot with a collider that has character collider field enabled. Next, specify slot(s) for the user to exit out of in the Exits list. Walking into the collider zone will send you and anyone else to the target Exit

Examples

Can be used in conjunction with a Camera Portal to make a gateway/portal. It can also be used to make a Tardis interior.

Related Components