Methods
At this page, you can see all methods that are currently implemented
Remember!
These methods must be applied to InfoCast
Non-Physics methods
TerminateCast
Terminates the cast.SetSpeed
Sets the speed of the cast.AddSpeed
Adds the speed to the cast.GetSpeed
Returns the current speed of the cast.GetPosition
Returns the current position of the cast.GetDirection
Returns the current direction of the cast.SetDirection
Sets the direction of the cast.SetPosition
Sets the position of the cast.Remember!
Angles must not be in radians.
SetRotationSpeed
Sets the speed of rotation of the cast.AddRotationSpeed
Adds the speed of rotation to the cast.SetMaxAngleToLoseTheTarget
Sets the angle at which the cast loses its target.AddMaxAngleToLoseTheTarget
Adds to the angle at which the cast loses its target.Pause
Pauses the simulation of the cast.UnPause
Resumes the simulation of the cast.IsPaused
Returnstrue
if the cast is paused, otherwise false
.
PauseTrajectory
Pauses the trajectory from advancing.UnPauseTrajectory
Resumes the trajectory.IsPausedTrajectory
Returnstrue
if the trajectory is paused, otherwise false
.
GetProgress
Returns the current covered distance and total flight time. If the covered distance is greater than or equal to0
, it also returns the percentage of how far the cast has traveled. The same applies to the total flight time.
UpdateRaycastParams
Sets new raycast parameters for the cast.SetXscale
Sets the X scale of a trajectory point to a given value (from0
to 1
). The index
determines the position in the trajectory list.
SetYscale
Sets the Y scale of a trajectory point to a given value (from-1
to 1
). The index
determines the position in the trajectory list.
GetDistanceToTarget
Returns the distance to the target if the target is notnil
, otherwise returns nil
.
GetTargetInfo
Returns the position and velocity of the target. If the target is aVector3
, it only returns the position. If the target is nil
, both return values will be nil
.
SetHighPrecision
Sets the high precision mode to the given value.SetTarget
Sets the target to the given value.Remember!
The Model
must have its primary part set; otherwise, an error will occur!
Beware!
Setting a new target too frequently can lead to unexpected behaviors!
Physics methods
SetMass
Sets the mass used for the physics simulationAddMass
Adds to the mass used for the physics simulationSetLiftPower
Sets the lift power used for the physics simulationAddLiftPower
Adds to the lift power used for the physics simulationSetYawPower
Sets the yaw power used for the physics simulationAddYawPower
Adds to the yaw power used for the physics simulationSetDragCoefficient
Sets the drag coefficient used for the physics simulationAddDragCoefficient
Adds to the drag coefficient used for the physics simulationSetInducedDragYaw
Sets the yaw-induced drag value used for the physics simulationAddInducedDragYaw
Adds to the yaw-induced drag value used for the physics simulationSetInducedDragPitch
Sets the pitch-induced drag value used for the physics simulationAddInducedDragPitch
Adds to the pitch-induced drag value used for the physics simulationSetThrustPower
Sets the thrust power used for the physics simulationAddThrustPower
Adds to the thrust power used for the physics simulationSetMaxAngle
Sets the maximum angle used for the physics simulationMeans max angle from velocity direction
AddMaxAngle
Adds to the maximum angle used for the physics simulationMeans max angle from velocity direction