Hi all,
A quick and (hopefully) easy question with regards trig/raycasting.
In my game I have a player that can move anywhere on the screen and can face in any direction.
One of the weapons available is a laser so what I’d like to do when the player fires it is to raycast in the direction that the player is facing to the edge of the screen and then have the first hit returned. What I’m struggling with is the target x/y for the ray cast as it’s not a fixed distance from the player and maths/trig still remains a dark art to me :( I hope my explanation makes sense.
Any help at all would be appreciated.
Many thanks
Chris