Question by
Carson23 · May 23, 2020 at 03:35 AM ·
scripting problemraycastscenetilemap
Using Raycast2D over Tilemap?
Hey guys so I'm trying to make a laser weapon. My first approach was a massive sprite and trigger collider that was enabled once it was time to shoot. After adding a basic scene with the tilemap I wanted the laser to stop at the wall so I decided to implement the laser with a raycast2D and line renderer. The problem is hit.point always returns the origin of the Wall tilemap.I don't know how to get where it stops at the collider I've searched everywhere for a solution and I can't find one. Any help would be appreciated.
screen-shot-2020-05-22-at-100708-pm.png
(98.1 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612235024im_/https://answers.unity.com/themes/thub/images/avi.jpg)