Skip to content

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

InfoCast:TerminateCast()
Terminates the cast.


SetSpeed

InfoCast:SetSpeed(Speed: number)
Sets the speed of the cast.


AddSpeed

InfoCast:AddSpeed(Speed: number)
Adds the speed to the cast.


GetSpeed

InfoCast:GetSpeed(): number
Returns the current speed of the cast.


GetPosition

InfoCast:GetPosition(): Vector3
Returns the current position of the cast.


GetDirection

InfoCast:GetDirection(): Vector3
Returns the current direction of the cast.


SetDirection

InfoCast:SetDirection(Direction: Vector3)
Sets the direction of the cast.


SetPosition

InfoCast:SetPosition(Position: Vector3)
Sets the position of the cast.


Remember!

Angles must not be in radians.


SetRotationSpeed

InfoCast:SetRotationSpeed(Number: number)
Sets the speed of rotation of the cast.


AddRotationSpeed

InfoCast:AddRotationSpeed(Number: number)
Adds the speed of rotation to the cast.


SetMaxAngleToLoseTheTarget

InfoCast:SetMaxAngleToLoseTheTarget(Angle: number)
Sets the angle at which the cast loses its target.


AddMaxAngleToLoseTheTarget

InfoCast:AddMaxAngleToLoseTheTarget(Angle: number)
Adds to the angle at which the cast loses its target.


Pause

InfoCast:Pause()
Pauses the simulation of the cast.


UnPause

InfoCast:UnPause()
Resumes the simulation of the cast.


IsPaused

InfoCast:IsPaused(): boolean
Returns true if the cast is paused, otherwise false.


PauseTrajectory

InfoCast:PauseTrajectory()
Pauses the trajectory from advancing.


UnPauseTrajectory

InfoCast:UnPauseTrajectory()
Resumes the trajectory.


IsPausedTrajectory

InfoCast:IsPausedTrajectory(): boolean
Returns true if the trajectory is paused, otherwise false.


GetProgress

InfoCast:GetProgress(): (number, number, number?, number?)
Returns the current covered distance and total flight time. If the covered distance is greater than or equal to 0, it also returns the percentage of how far the cast has traveled. The same applies to the total flight time.


UpdateRaycastParams

InfoCast:UpdateRaycastParams(Params: RaycastParams)
Sets new raycast parameters for the cast.


SetXscale

InfoCast:SetXscale(index: number, value: number)
Sets the X scale of a trajectory point to a given value (from 0 to 1). The index determines the position in the trajectory list.


SetYscale

InfoCast:SetYscale(index: number, value: number)
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

InfoCast:GetDistanceToTarget(): number?
Returns the distance to the target if the target is not nil, otherwise returns nil.


GetTargetInfo

InfoCast:GetTargetInfo(): (Vector3?, Vector3?)
Returns the position and velocity of the target. If the target is a Vector3, it only returns the position. If the target is nil, both return values will be nil.


SetHighPrecision

InfoCast:SetHighPrecision(value: number)
Sets the high precision mode to the given value.


SetTarget

InfoCast:SetTarget(Target: Vector3 | BasePart | Model | nil)
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

Simulation:SetMass(Mass: number)
Sets the mass used for the physics simulation


AddMass

Simulation:AddMass(Mass: number)
Adds to the mass used for the physics simulation


SetLiftPower

Simulation:SetLiftPower(LiftPower: number)
Sets the lift power used for the physics simulation


AddLiftPower

Simulation:AddLiftPower(LiftPower: number)
Adds to the lift power used for the physics simulation


SetYawPower

Simulation:SetYawPower(YawPower: number)
Sets the yaw power used for the physics simulation


AddYawPower

Simulation:AddYawPower(YawPower: number)
Adds to the yaw power used for the physics simulation


SetDragCoefficient

Simulation:SetDragCoefficient(DragCoefficient: number)
Sets the drag coefficient used for the physics simulation


AddDragCoefficient

Simulation:AddDragCoefficient(DragCoefficient: number)
Adds to the drag coefficient used for the physics simulation


SetInducedDragYaw

Simulation:SetInducedDragYaw(InducedDragYaw: number)
Sets the yaw-induced drag value used for the physics simulation


AddInducedDragYaw

Simulation:AddInducedDragYaw(InducedDragYaw: number)
Adds to the yaw-induced drag value used for the physics simulation


SetInducedDragPitch

Simulation:SetInducedDragPitch(InducedDragPitch: number)
Sets the pitch-induced drag value used for the physics simulation


AddInducedDragPitch

Simulation:AddInducedDragPitch(InducedDragPitch: number)
Adds to the pitch-induced drag value used for the physics simulation


SetThrustPower

Simulation:SetThrustPower(ThrustPower: number)
Sets the thrust power used for the physics simulation


AddThrustPower

Simulation:AddThrustPower(ThrustPower: number)
Adds to the thrust power used for the physics simulation


SetMaxAngle

Simulation:SetMaxAngle(MaxAngle: number)
Sets the maximum angle used for the physics simulation

Means max angle from velocity direction


AddMaxAngle

Simulation:AddMaxAngle(MaxAngle: number)
Adds to the maximum angle used for the physics simulation

Means max angle from velocity direction


SetPitchAoA

Simulation:SetPitchAoA(PitchAoA: {})
Sets the angle of attack curve for pitch in the physics simulation


YawAoA

Simulation:YawAoA(YawAoA: {})
Sets the angle of attack curve for yaw in the physics simulation


SetAdditionalForces

Simulation:SetAdditionalForces(Force: Vector3)
Sets the additional forces applied to the physics simulation


AddAdditionalForces

Simulation:AddAdditionalForces(Force: Vector3)
Adds to the additional forces applied to the physics simulation