For the complete documentation index, see llms.txt. This page is also available as Markdown.

BallSimTargetResult

Overview

BallSimTargetResult is the return value of methods that calculate launch conditions toward a target position, such as SimulationBall:SimulateToTarget(), SimulationBall:ReSimulateToTargetWithDelay(), and SimulationBall:ReSimulateSpinToTargetWithDelay(). It contains whether a trajectory that reaches the target point was found, the speed and direction actually used, and the time at which the target is reached.

Constructors

Properties

ActualSpeed

number

The speed actually used for the launch (in km/h). If UseDesiredSpeed was set to true in the call, the requested speed value is returned as-is.

Code Samples

local result = result -- BallSimTargetResult obtained from SimulateToTarget, etc.
print("Actual speed (km/h):", result.ActualSpeed)

bHit

boolean

Indicates whether a valid trajectory that reaches the target position was found. If false, ActualSpeed, Direction, and HitTime are all default values (0 or the zero vector).

Code Samples

Direction

Vector3

The unit vector of the direction required for the actual launch.

Code Samples

HitTime

number

The time (in seconds), relative to the start of playback, at which the target is reached. It is 0 if bHit is false.

Code Samples

Methods

Events

See also

SimulationBall

Last updated