|
-
Depth problem in Multi-tile Sized Objects in Isometric Engine
Hi,
Introduction:
Im developing an isometric map builder. This will allow users to make their own isometric envioenments. This is how i have done this, I have 3 layers. The bottom one has a movie clip 'grid ' that gets populated with tiles, starting from top left to bottom right, with every next tile having the next higher depth starting from 0. Above the grid layer, I have the 'floorTiling' movie clip. Whenever a user clicks on a grid tile with floor tiling selected, a tile is placed in the 'floorTiling' clip with the same x,y cordinates as that of the tile clicked in the grid, AND the same depth. Similarly, on the layer above this, I have a movie clip that will contain furniture and pillars, when you select a furniture or pillar, it gets placed in this movie clip named 'placedObjects' (with the same x,y and depth value as that of the grid)
Now according to the above, every next tile/object placed in the map (right or first in the next line) has the Depth value above the previous one. This is done so that every single tile object placed shows in the right way, i-e the front ones higher depth value as the behind ones.
Code:
<1><2><3><4>
<5><6><7><8>
The Problem
Everything works fine as long as my object width are within the tile width. If they have a high height, even that looks all fine. Now the problem arises that when in the 'placedObjects' clip, when I place a Table, which is suppose to take up space higher than 1 tile (6 in this case - 2x3) It shows like this. I am placing the table at a lowest depth or highest depth it may occupy (by simply shift the center of the movie clip to upper or lower area of the table), in both cases, i get this problem.


As you can see, this is because the depth value the table is getting too high or too low to fit in properly. Im kinda stuck, anyone got any tips on how to get this right. If you've got any other questions, feel free to ask.
There are only 2 solutions i can think of, both seem kinda troubling.
1 - Break the table into 6 different tiles (very messy if i wanna go into low quality mode) n place these tiles on different depths according to the grid.
2 - Mess up my depth chart n swap depths with the maximum/minimum depth that can mess with my table.
Any comments, tips, techniques... anything?
Last edited by alikapadia; 01-10-2006 at 10:22 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|