Block selection in tile-based game
I know that this problem can probably be solved with some basic trig, but
for some reason, I can't figure out what exactly to do for the life of me.
I'm making a game that's not unlike Terraria (it's basically 2-dimensional
Minecraft), and one of the features that's required is block selection
based on the location of the mouse relative to the player. This leads to a
problem where the distance between two point is known, along with the
location of one point and the angle formed by the line between the player
and the mouse and a vertical line containing the player. How would I
determine the second point?
No comments:
Post a Comment