sm.physics.raycastTarget
Performs a ray cast between two positions to find a specific target.
Kind: Function
Environments: Game
Game
sm.physics.raycastTarget( start, end, body, world, ignoreUuids )
a Body must be provided as a target.
The returned RaycastResult contains information about any object intersected by the ray.
Parameters:
| Name | Type | Description |
|---|---|---|
start |
Vec3 | The start position. |
end |
Vec3 | The end position. |
body |
Body | The body to be exclusively checked. |
world (optional) |
World | The world to perform the raycast in. (Optional) |
ignoreUuids (optional) |
table | A table of uuids {Uuid, ...} of Shape, Harvestable or Character type to be ignored. (Optional) |
Returns:
| Type | Description |
|---|---|
| boolean | True if raycast was successful |
| RaycastResult | The raycast result data. |