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 / Placing objects in matrix ?

Author
Message
retardnewb17
13
Years of Service
User Offline
Joined: 6th Oct 2011
Location:
Posted: 1st Sep 2012 12:02
If I want to place an object to every single "tile" of matrix, what would be the best way to do it. (the matrix is very big...)
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Sep 2012 17:56
How big are we talking?

Usually something like this will do it:



MaxTilesX and MaxTilesY are how many tiles you have on the matrix.
TileSizeX and TileSizeY can be calculated with this:

TileSizeX = (total X-size of matrix) / MaxTilesX
TileSizeY = (total Y-size of matrix) / MaxTilesY

The object size will probably have to be changed to fit your needs.

TheComet

"if you don't understand recursion than you probably don't understand recursion." ~Jerico2day
retardnewb17
13
Years of Service
User Offline
Joined: 6th Oct 2011
Location:
Posted: 1st Sep 2012 19:59
This helped a lot, Thanks.

Login to post a reply

Server time is: 2024-11-23 17:45:58
Your offset time is: 2024-11-23 17:45:58