• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Depth not workihng properly after breaking an object

FoxyOfJungle

Kazan Games
As the Y is varying according to -bbox_bottom, then setting it manually will at some point cause the depth to be incorrect. What you need to do is set the depth based on an instance and subtract it by a number.
Something like:
GML:
depth = the_instance_id.depth - 1;
Remember, subtracting -1 will make it top/above, +1 bottom/behind.
 

1tsmey0sh1

Member
As the Y is varying according to -bbox_bottom, then setting it manually will at some point cause the depth to be incorrect. What you need to do is set the depth based on an instance and subtract it by a number.
Something like:
GML:
depth = the_instance_id.depth - 1;
Remember, subtracting -1 will make it top/above, +1 bottom/behind.
i forgot to update it i fixed the bug but still thanks for the help!
 
Top