Hi. I’m trying to make an object that can be stacked up, like a box, for my platform game. I want it to be able to stand on the ground (a platform object) and also stand on another instance of itself. But it must react to gravity, so when the player destroy a box, the one that is on top of it fall until it reach the ground or another instance of itself.
I tryed using the physics behavior but it makes the object move in a very bizarre way (maybe I just dont know how to work with the physics behavior)
I also tryed making the box a platform and a platformer object at the same time. So it will be able fall with gravity, stand on a regular platform and stand on each other. This method got me close to what I want but it still has too many glitches. The boxes “sink” on the ground when the game starts.
Is there any way to make an object like that on GDevelop?
Thanks in advance, any information will be appreciated.
Physics behaviour will be the way you want to go.
Bizarre in what way? Can you screen shot the behaviour settings you have on the objects?
Note, if you use physics behaviour, then you can’t use other behaviours or non-physics positional actions on the objects without potentially getting weird object movement
Thanks for replying.
Maybe that’s the problem: the box had both platform and physics behavior active. I placed the boxes stacked up, the bottom of one touching the top of the other, but not overlaping their hitboxes. When the game starts, the boxes spread slowly and stop with a gap of 1 or 2 pixels from each other (its easy to see it because the game graphics are pixelart).
I’m gonna take some screen shots and post them here soon.
Anyway, even deactivating the platform behavior and using just the physics behavior I still have no idea how to make it work
I’ve read about how to use physics in GDevelop and it seems a little too complicated for me to implement it at this point. I would have to remake some stuff to include physics and make these falling boxes work. I’m gonna put it aside for now, considering these falling boxes aren’t so important for my game mechanics. But maybe I’ll use some physics in my next game. Thank you for your help!