2D Raycast Hit Detection is a tool for detecting if a moving object hit something using raycasting. It is useful for when you need more precise detection quality or the object is moving very fast (a bullet for example)
Note that this is not a 100% user friendly script. You most likely need to modify the script to suit your needs. Also with a bit of tinkering this should be easy to convert for 3D games as well
- Add Sensors.cs to a gameObject
- Assign the 3 transforms in the inspector
- Tweak the options to see what works the best
I recommend looking at the included ExampleProject for a better understanding
- This gif shows the 4 levels of detection complexity