Just a noob question here.
So here's the setup.
I want to implement a bullet hit using raycast function.
For example I have a resolution of 480x980.
Let's say my hero is at (240, 900) and the enemy is at (400, 200)
I want to hit the enemy instantly using bullet from my players coordinate. I want to use raycast if possible.
Please help me for the logic, and event listeners .
Thank you ☺️☺️