I’m practicing with Defold physics, but there is something I don’t fully understand.
I have two dynamic objects resting on top of a kinematic platform that moves on x. Both objects collide with each other so the kinematic platform stops the dynamic object from falling down. So far what I expected, but when the kinematic platform moves the dynamic objects that rest on top of it don’t move along, why is that? I was expecting that the platform carries along the dynamic objects.
I attach a pic of the situation with the physics debug enabled.
I have set friction to 1 on all the objects with the same results. I also increased the gravity as far as -10000, but it didn’t affect the result.
I noticed that when a dynamic object is on top of another dynamic object and the object below moves it does carry the object on top. It just doesn’t seem to work this way with kinematic objects carrying dynamic objects.
I’m toying with a physics puzzle where player has to destroy or move objects to make a square reach x position. Most objects in the game respond to physics and gravity but I wanted to put as well some flying platforms and some objects player can drag on an axis to make things more interesting.
Is there a way to make a dynamic object to ignore gravity in order to make it a flying platform?
Thanks again for you help britzl. I’m still new in Defold.
You could have both kinemtic+dynamic collisions objects on the gameobject in question and disable/enable them as needed. With a kinematic you take control of setting position, applying gravity etc. but you still get collision messages.
For example, when colliding with a platform you can disable the dynamic object, enable the kinematic and parent it to the platform and so on.