Project Force
v1.0
Last updated
v1.0
Last updated
One of the coolest effects a projectile or impact particle can do is project force, blasting objects away, or sucking them into a vortex. There are multiple scripts we provide which project force.
ProjectForce.cs can be added to any object
Force happens over time and the effects will be present as long as the duration lasts. If Impulse is selected, the impact only happens once. You can optionally multiple the force by duration (when impuse is selected) to have the full force * duration applied at once.
It may be good to test the values to ensure the effect is what you're looking for.
When Apply Force in Direction
is false
, the force will be applied in a sphere around the object to a distance of Area Radius
.
Otherwise it will be applied in a forward spherical cone determined by Forward Max Angle
, with a total distance of Area Radius
.
The force can be delayed, and a specific duration can also be selected. If Duration
is -1, it will last as long as the component is active.
This class derives from ProjectForce.cs
and has an additional option for a Projectile, allowing the force to only apply when the Projectile is launched.
This class also derives from ProjectForce.cs
and adds an animation curve, which will modify the force over time. This enables switching from negative to positive force as well.