Skip to content

CastResult2D

Stone Hobbs edited this page Jun 27, 2022 · 1 revision

struct CastResult2D{}

CastResult2D
{
     bool success,
     Vector2 ray,
     Vector2 hitPoint,
     Collider2D hitCollider
}

Description

This is a struct to hold information about collisions.

Fields

success

true is there was a collision, otherwise false


ray

the difference between hitPoint and the point on the shape that hit it


hitPoint

the point that was hit


hitCollider

the collider that was hit

only used when multicasting with colliders

Clone this wiki locally