format
typescript
Rigidbody.SweepTest(direction, maxDistance)class: Rigidbody
description
Test if the rigidbody will collide with any objects when moving in the scene.
Returns true if the rigidbody scans and overlaps with any colliders, otherwise returns false.
parameter
| param_name | type | description |
|---|---|---|
| direction | Vector3 | The direction in which the rigidbody is scanned. |
| maxDistance | number? | The distance of the scan. |
reture
| type | description |
|---|---|
RaycastHit|undefined | Whether the rigidbody will collide with any objects. |
