hi guys. i have a problem,
i want to say,
if “RED BOX” entered to the “cycle collider2d(blue cycle on the left of the picture)”
debug.log(“Entered”);
and then , if “Upper left corner” of the “RED BOX” Stayed on the “cycle collider2d(blue cycle on the left of the picture)” then,
debug.log(“do something”);
For if a point is within a circle, that’s just checking if it’s closer to the circle center than it’s radius.
to get that corner point in world space you can do rectangleTransform.TransformPoint(new Vector3(0,1,0)); where rectangleTransform is your rect transform, the corner point is uniformly scaled with it (colliders are able to be bigger or smaller than their transform) and we are looking along z.
for the check ignore z as it’s looking 2D to me.