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.
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.
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.