Physics Extensions
Get Hit Object
This returns the GameObject that was hit by the raycast, or null if there was no hit.
Get Hit Objects
This returns an array of GameObjects hit by the raycast, or null if no objects were hit.
Get Hit Component
This returns the specified component type T from the hit GameObject, or null if no hit occurred.
Get Hit Components
This returns an array of components of type T from all GameObjects hit by the raycast, or null if none were hit.
Last updated