|
Post by Jcash on Oct 9, 2018 13:29:48 GMT
I was trying to put a object into the tile, such as a house. I simply add a cube with the correct mesh, and it instantiates and loads perfect. The issue is if I try to grow the tile, the house also gets horribly stretched. Is there any way that I can detach the cub before the tile grows, then reattach it after the tile has grown, and keep the original y height?
|
|
|
Post by Admin on Oct 9, 2018 19:22:21 GMT
Yes. For example, use the Transform.SetParent method to make the house's parent 'null' and then reset the localScale before reparenting. Also remember that objects don't have to be parented to the tiles, you can simply move them to the proper position in space like we do with units.
|
|
|
Post by cerulea on Oct 11, 2018 22:19:57 GMT
I did something similar, in the match function. I had to disable match in the update function I had though, or it would break in an actual battle. Everything seems to be working correctly though now~
|
|