Original Post
Hi all :) I am developing some drafts for my new game for few hours now. My map is defined with; #define WALKABLE 1 #define BLOCKED 0 struct _M{ int texture; int walkable; }MAP[100][100]; Some of my MAP places are blocked by editor, this is simple. I am walking using 'W,S,A,D' and using rotation by mouse. To compute the walk forward math's i use: PLAYERS[a].x+= ((float)sin(PLAYERS[a].rot*piover180))*PLAYER_SPEED; // Move On The X-Plane Based On Player Direction PLAYERS[a].z+= ((float)cos(PLAYERS[a].rot*piover180))*PLAYER_SPEED; The thing is: How to caltulate next tile position of my player to predict eventual walking on BLOCKED tile? Knowing the angle of rotation and actual position - how can this be calculated? many thanks for any reply, i am stuck here..