Physics

Some commonly used physics functions.

Function
Returns
Description

LineCast(start: Vector3, end: Vector3, collideWith: string)

LineCastHitResult

Performs a linecast between start and end vectors and colliding with the collideWith category (such as "Characters"). If an object is found return that object, otherwise return null.

SphereCast(start: Vector3, end: Vector3, radius: float, collideWith: string)

object

Performs a spherecast between start and end vectors with radius and colliding with the collideWith category (such as "Characters"). If an object is found return that object, otherwise return null.

Last updated