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(customReason: string?)
Terminates the cast.
SetTimer
InfoCast:SetTimer(duration: number, func(A...) -> (R...), parameters: A...)
Sets a timer that runs the given function after the specified time.
GetCosmeticBullet
InfoCast:GetCosmeticBullet(): any?
Retuns copied cosmetic bullet.
SetSpeed
InfoCast:SetSpeed(Speed: number | Vector3)
Sets the speed of the cast.
AddSpeed
InfoCast:AddSpeed(Speed: number | Vector3)
Adds the speed to the cast.
GetSpeed
InfoCast:GetSpeed(): (number | Vector3)
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
Pauses the simulation of the cast.
Resume
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.
ResumeTrajectory
InfoCast:ResumeTrajectory()
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!
SetOffset
InfoCast:SetOffset(func: (number, number, Vector3, Vector3) -> (Vector3))
Sets the new Offset function.
SetOffset
InfoCast:SetScaler(func: (number, number, Vector3, Vector3) -> (Vector3 | number))
Sets the new Scaler function.
Physics methods
IsPhysics
Simulation:IsPhysics(): boolean
Returns whether projectile has physics
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
SetGLimit
Simulation:SetGLimit(G_Limit: number)
Sets the G limit used for the physics simulation
AddGLimit
Simulation:AddGLimit(MaxAngle: number)
Adds to the G limit used for the physics simulation
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