Component:CharacterForceField: Difference between revisions

From Resonite Wiki
add some info
add final info
 
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 ==
Line 14: Line 15:
|ForceSlotSpace|{{RootFieldType|RootSpace}}|TypeAdv5=true| Override the transform space for <code>Force</code> with this if set.
|ForceSlotSpace|{{RootFieldType|RootSpace}}|TypeAdv5=true| Override the transform space for <code>Force</code> with this if set.
|MinActivationVelocity|Float| The minimum velocity a character controller has to be going to trigger this force field.
|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| Whether to ignore the active user when finding character controllers within range of <code>RadialForceRadius</code>. This also ignores character controllers that are simulated by the user. (TODO: is this true?)
|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| The maximum velocity this component can set a character controller's speed to after setting a force on it.
|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.
|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 ==
Line 35: Line 37:
[[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