er2.raycast 2
Casts a ray from an origin toward a direction. Used to test collisions and objects presence.
The test is done trough a Unity Raycast.
Return value
Return Type | Description |
---|---|
float | Returns the distance from the ray's origin to the impact point. Returns -1 if the ray doesn't intersects with any Collider. |
Parameters
Parameter | Type | Description |
---|---|---|
1 | vec3 | The starting point of the ray |
2 | vec3 | The direction of the ray |
3 | float | (Optional) The max distance the ray should check for collisions. If not specified, max distance will have no limit |
Examples
No examples available.