Skip to content

Raycast 2D

Physics ยป Raycast 2D

Description

Returns true if there any object between two positions in 2D space

Parameters

Name Description
Source The scene position where the raycast originates
Target The targeted position where the raycast ends
Layer Mask A bitmask that skips any objects that don't belong to the list

Example 1

Note that this Instruction uses Unity's 2D physics engine. It won't collide with any 3D objects

Keywords

Check Collide Linecast See 2D