Component:CharacterForceField: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add final info
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
}}
}}
{{stub}}
{{stub}}
This component creates a force field that allows the setting of or applying force to the velocity of [[Component:CharacterController|Character Controllers]].


== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|TriggersOnly|Bool|
|TriggersOnly|Bool| Whether to only allow trigger colliders attached to character controller objects to activate the force field.
|Force|Float3|
|Force|Float3|force direction and magnitude to apply a character controller within range with.
|ForceMode|'''[[#Mode|Mode]]'''|TypeAdv2=true|
|ForceMode|'''[[#Mode|Mode]]'''|TypeAdv2=true| Whether to use impulse, apply, or set velocity using <code>Force</code>
|ForceSpace|'''[[#Space|Space]]'''|TypeAdv3=true|
|ForceSpace|'''[[#Space|Space]]'''|TypeAdv3=true| Whether to do the force direction in local or global space (so should <code>Force</code> be scaled and rotated by the slot this is on or not?)
|RadialForceRadius|Float|
|RadialForceRadius|Float| The range of effect this force field has.
|ForceSlotSpace|{{RootFieldType|RootSpace}}|TypeAdv5=true|
|ForceSlotSpace|{{RootFieldType|RootSpace}}|TypeAdv5=true| Override the transform space for <code>Force</code> with this if set.
|MinActivationVelocity|Float|
|MinActivationVelocity|Float| The minimum velocity a character controller has to be going to trigger this force field.
|MaxForceVelocity|Float|
|MaxForceVelocity|Float| How fast the character controller's velocity can be at max after being affected by this component when the user isn't holding [[Controls|Jump]]
|HoldJumpMaxForceVelocity|Float|
|HoldJumpMaxForceVelocity|Float| How fast the character controller's velocity can be at max after being affected by this component when the user is holding [[Controls|Jump]]
|PreseveDirectionAcrossPlane|Bool|
|PreseveDirectionAcrossPlane|Bool| Calculates a plane that is perpendicular to the vector <code>Force</code> (like a stick stuck into a piece of paper) and maintains the initial direction of the velocity of the character controller in either the forward or backwards facing direction of this plane.
|IgnoreParentUser|Bool|
|IgnoreParentUser|Bool| Whether to ignore the active user when finding character controllers within range of <code>RadialForceRadius</code>. This does not ignore character controllers that are simulated by the user.
|NoJumpMultiplier|Float|
|NoJumpMultiplier|Float| How much to multiply the effect of <code>Force</code> when the user isn't holding [[Controls|Jump]]
|HoldJumpMultiplier|Float|
|HoldJumpMultiplier|Float| How much to multiply the effect of <code>Force</code> when the user is holding [[Controls|Jump]]
|MaxCharacterVelocity|Float|
|MaxCharacterVelocity|Float| The maximum velocity this component can set a character controller's speed to after setting a force on it.
|MinCharacterVelocity|Float|
|MinCharacterVelocity|Float| The minimum velocity this component can set a character controller's speed to after setting a force on it.
|CharacterVelocityDampeningSpeed|Float|
|CharacterVelocityDampeningSpeed|Float| How fast to slow the user down. this can be used to give the effect of jumping into molasses.
}}
}}


== Behavior ==
== Behavior ==
Needs a collider on the same hierarchy to allow triggering this component.


== Examples ==
== Examples ==


== See Also ==
== See Also ==
[[Component:CharacterController|Character Controllers]]


[[Category:Components:Locomotion:Interaction{{#translation:}}|Character Force Field]]
[[Category:Components:Locomotion:Interaction{{#translation:}}|Character Force Field]]
[[Category:Components{{#translation:}}|Character Force Field]]
[[Category:Components{{#translation:}}|Character Force Field]]
[[Category:Components With Nested Enums{{#translation:}}|Character Force Field]]
[[Category:Components With Nested Enums{{#translation:}}|Character Force Field]]
[[Category:ComponentStubs]]

Latest revision as of 17:40, 19 October 2024

Component image 
Character Force Field component as seen in the Scene Inspector


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


This component creates a force field that allows the setting of or applying force to the velocity of Character Controllers.

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.
TriggersOnly Bool Whether to only allow trigger colliders attached to character controller objects to activate the force field.
Force Float3 force direction and magnitude to apply a character controller within range with.
ForceMode Mode Whether to use impulse, apply, or set velocity using Force
ForceSpace Space Whether to do the force direction in local or global space (so should Force be scaled and rotated by the slot this is on or not?)
RadialForceRadius Float The range of effect this force field has.
ForceSlotSpace direct RootSpace Override the transform space for Force with this if set.
MinActivationVelocity Float The minimum velocity a character controller has to be going to trigger this force field.
MaxForceVelocity Float How fast the character controller's velocity can be at max after being affected by this component when the user isn't holding Jump
HoldJumpMaxForceVelocity Float How fast the character controller's velocity can be at max after being affected by this component when the user is holding Jump
PreseveDirectionAcrossPlane Bool Calculates a plane that is perpendicular to the vector Force (like a stick stuck into a piece of paper) and maintains the initial direction of the velocity of the character controller in either the forward or backwards facing direction of this plane.
IgnoreParentUser Bool Whether to ignore the active user when finding character controllers within range of RadialForceRadius. This does not ignore character controllers that are simulated by the user.
NoJumpMultiplier Float How much to multiply the effect of Force when the user isn't holding Jump
HoldJumpMultiplier Float How much to multiply the effect of Force when the user is holding Jump
MaxCharacterVelocity Float The maximum velocity this component can set a character controller's speed to after setting a force on it.
MinCharacterVelocity Float The minimum velocity this component can set a character controller's speed to after setting a force on it.
CharacterVelocityDampeningSpeed Float How fast to slow the user down. this can be used to give the effect of jumping into molasses.

Behavior

Needs a collider on the same hierarchy to allow triggering this component.

Examples

See Also

Character Controllers