Component:CharacterParenter: Difference between revisions

From Resonite Wiki
add info
Added some behaviors to the character parenter that can help people use it more efficiently
 
(2 intermediate revisions by 2 users not shown)
Line 10: Line 10:
|NestIntoSpace|Bool| Parent the user into the slot <code>ParentSpace</code> or not.
|NestIntoSpace|Bool| Parent the user into the slot <code>ParentSpace</code> or not.
|MustBeOnGround|Bool| The user must be on the ground according to the [[Component:CharacterController|character controller]] before they will be aligned/parented.
|MustBeOnGround|Bool| The user must be on the ground according to the [[Component:CharacterController|character controller]] before they will be aligned/parented.
|Filters|{{RootFieldType|SyncList`1|[[#AlignmentFilter|AlignmentFilter]]}}|TypeAdv3=true| What directions a user must be aligned to relative to the slot this component is on for them to get parented.
|Filters|{{RootFieldType|SyncList`1|[[#AlignmentFilter|CharacterParenter.AlignmentFilter]]}}|TypeAdv3=true| What directions a user must be aligned to relative to the slot this component is on for them to get parented.
|IgnoreParentUser|Bool| Ignore the active user of this component when attempting to parent a user.
|IgnoreParentUser|Bool| Ignore the active user of this component when attempting to parent a user.
|ParentSpace|{{RootFieldType|RootSpace}}|TypeAdv5=true| The space that users should get parented to when using <code>NestIntoSpace</code>.
|ParentSpace|{{RootFieldType|RootSpace}}|TypeAdv5=true| The coordinate space that calculations should be done in.
}}
}}


== Behavior ==
== Behavior ==
Disabling the collider the CharacterParenter is connected to might be preferred compared to disabling the slot or the CharacterParenter's enabled state itself, as disabling the collider will throw a ContactEnd event to the CharacterPareneter and correctly de-parent the user's inside.
Disabling the CharacterParenter itself while users are inside the ParentSpace will mean the component can't de-parent users correctly and might not be wanted behavior.


== Examples ==
== Examples ==

Latest revision as of 00:49, 6 October 2025

Component image 
Character Parenter component as seen in the Scene Inspector

Character Parenters are a component that allow for parenting or aligning the gravity of a user when they hit a collider.

Usage

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. Some components stop their functionality when this field is disabled, but some don't.
TriggersOnly Bool Whether to only allow trigger colliders that are part of this component's slot hierarchy to activate parenting.
NestIntoSpace Bool Parent the user into the slot ParentSpace or not.
MustBeOnGround Bool The user must be on the ground according to the character controller before they will be aligned/parented.
Filters list of CharacterParenter.AlignmentFilter What directions a user must be aligned to relative to the slot this component is on for them to get parented.
IgnoreParentUser Bool Ignore the active user of this component when attempting to parent a user.
ParentSpace direct RootSpace The coordinate space that calculations should be done in.

Behavior

Disabling the collider the CharacterParenter is connected to might be preferred compared to disabling the slot or the CharacterParenter's enabled state itself, as disabling the collider will throw a ContactEnd event to the CharacterPareneter and correctly de-parent the user's inside.

Disabling the CharacterParenter itself while users are inside the ParentSpace will mean the component can't de-parent users correctly and might not be wanted behavior.

Examples

This component is used in many different zones where keeping a user moving with something is essential. Objects like this include: platforms, elevators, mech control rooms, parkour platforms, spaceships, and the list can go on.

See Also

Issue 353, bumpiness issues when on another user