Properties
To access properties, you first need to require the module:
Then, create the properties:
Can I create more Properties
?
Yes, you can! This can be useful for different scenarios. For example, if your spell hits something and creates sub-spells, you can create additional properties to give them different behaviors
There are a lot of properties and they all are listed here!
MaxDistance
If the cast covers this distance, it will be terminatedTerminated!
This will fire:
TheReason
will be "MaxDistance"
MaxFlyTime
If the cast flies longer than this value, it will be terminatedTerminated!
This will fire:
TheReason
will be "MaxFlyTime"
RotationSpeed
Defines the speed at which the cast turnsRaysPerMove
Determines how many raycasts will be fired in one move.Performance Warning!
Setting this value too high (e.g., 20 or more) can cause significant lag
Recommended values range from 1 to 5
MaxAngleToLoseTheTarget
If the target moves outside this angle, the cast will lose track of itSimulateBeforePhysics
Iftrue
, the projectile will be simulated before physics calculations (Optional)
RayCastParams
Defines theRaycastParams
for the cast (Optional)
CosmeticBulletFolder
The folder used to contain cosmetic bulletsCosmeticBulletTemplate
The cosmetic bullet itselfPrediction
Iffalse
, target prediction is disabled. If true
then module will predict the target's future position based on its velocity and position
Trajectory
If notnil
, the projectile will attempt to follow the given trajectory. (Optional)
For more information, see Custom Trajectories.
Example
HighPrecision
If this value is greater than0
(e.g., 0.1, 0.2, 0.3, ..., 1
), the module will perform a secondary accuracy check after a low-fidelity raycast detects a hit. This value determines how precise the recalculations will be. (Optional)
Performance Warning!
Setting this value to extreme small numbers (e.g., 0.01
or smaller) can cause significant lag
Recommended values range from 0.1
Offset
Properties.Offset :: (TotalTime: number, DeltaTime: number, TargetPosition: Vector3, CurrentPosition: Vector3) -> (Vector3)
Example
The projectile will fly above the target's actual positionHow does Offset work?
Scaler
Properties.Scaler :: (TotalTime: number, DeltaTime: number, TargetPosition: Vector3, CurrentPosition: Vector3) -> (Vector3 | number)
How does Scaler work?
Remember!
First, the target's position will be scaled, and then an offset will be applied