The original problem
To avoid any miscommunication, my original problem is trying to find a way to move the player to a tile diagonal of their position.
As I’m currently using raycasting to detect the target tile to move the player, this wouldn’t work with diagonal tiles as the ray would simply hit either the front or right tile.
The problem with my solution
To keep things short, my attempt at a solution involves casting a ray first to the right tile, then cast another ray forward like so:
However, how would I check the angle the player is facing so the script knows when the player wants to move diagonally, e.g, when the player is not facing right angles (90, 180, 270 etc).
Eitheir a solution to my original problem or an answer to my attempted solution is welcome.