Original Post
Hi I am still writing my 2D racing game engine with a perception of 3D ( like the mario kart on the snes). Everything was working fine till I got to rotating.
The way I am doing it is the player has a bearing,xpos & ypos. He moves around the level with xpos & ypos but the level rotates around him depending on his bearing.
So every time the frame is drawn the engine goes to every topleft hand corner of a tile & rotates approbiately according to the bearing. So it finds how many tiles away from the players xPos & how many tiles away from the players yPos. Then uses pythogras theroem to find the distance of the top left corner form the player. Now that I know the distance from the player ot the top left corner of the tile & I want to find out where its new position will be by rotating it. How would I do this without using a compass :p ?
Some how I have to take into the account the distance & the bearing to figure out where the new location is ?
y
\
\
\
x---
(y is the top left of the tile ,x is the center of rotation (car) & it rotates the tile by 90 degres, how would I find the new position for tile)
thanx in advnace WizHarD
