- Home /
Question by
AmazingMrBrock · Mar 27, 2014 at 08:04 AM ·
c#raycastcolliderraycastingrect
(C#) Collider to collider2d
I'm trying to figure out how to change this to a collider2d format. I'm using this code in conjunction with some raycasting elements.
box = new Rect(
collider.bounds.min.x,
collider.bounds.min.y,
collider.bounds.max.x,
collider.bounds.max.y
);
I can't find an equivalent function to bounds for collider2d. I thought maybe shapeCount but it didn't work to just change it to that and there is no documentation for it.
So yeah if anybody could help me out that would be awesome.
Comment
Your answer
Follow this Question
Related Questions
Rect from two points issue 0 Answers
Raycasting ignoring small sized object 1 Answer
Raycast isn't working as expected 1 Answer
How to check if a raycast is not hitting any tagged colliders? 0 Answers
SInce when?!?!? (Raycast issue) 2 Answers