> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/development/api-reference/datatype/ballsimtargetresult.md).

# 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

```lua
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

```lua
local result = result -- BallSimTargetResult obtained from SimulateToTarget, etc.
if result.bHit then
    print("Found a trajectory that reaches the target")
end
```

### Direction

`Vector3`

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

#### Code Samples

```lua
local result = result -- BallSimTargetResult obtained from SimulateToTarget, etc.
print("Launch direction:", result.Direction)
```

### 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

```lua
local result = result -- BallSimTargetResult obtained from SimulateToTarget, etc.
if result.bHit then
    print("Hit time (s):", result.HitTime)
end
```

## Methods

## Events

## See also

{% content-ref url="/pages/ZaoG57umzS7C4yIBXybF" %}
[SimulationBall](/development/api-reference/classes/simulationball.md)
{% endcontent-ref %}
