Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Help with tiles please

Author
Message
Maelstrom
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: United Kingdom
Posted: 16th Mar 2004 21:56
If you know an objects x,z position can u tell which tileX,tileZ it is over.
Black Hydra II
20
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 16th Mar 2004 23:35
You can using simple math

By knowing the size of the map and the number of tiles along with the matrix's position you can determine what tile you are on top of

For example: The matrix is 4x4 tiles. it is positioned exactly in the middle of the world. it is 400x 400. your position is 300x, 100z thus you are in tile: 3x ; 1z. I could write it out as a computer formula but then what fun would you have?

"Damn had to remake account!" direct quotation from previous account.
Maelstrom
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: United Kingdom
Posted: 17th Mar 2004 10:53
And suddenly it becomes obvious. Thank's Black Hydra.

Login to post a reply

Server time is: 2024-11-26 09:41:39
Your offset time is: 2024-11-26 09:41:39