sm.localPlayer.getRaycast
Performs a raycast relative to the local player's perspective.
Kind: Function
Environments: Game
Game
sm.localPlayer.getRaycast( range, origin, direction )
Availability: Client only
Parameters:
| Name | Type | Description |
|---|---|---|
range |
number | The maximum range. |
origin (optional) |
Vec3 | The start position. (Defaults to sm.localPlayer.getRaycastStart) |
direction (optional) |
Vec3 | The direction. (Defaults to sm.localPlayer.getDirection) |
Returns:
| Type | Description |
|---|---|
| bool | True if raycast was successful |
| RaycastResult | Raycast result data. |