Hi, I’m having an issue with collision objects.
The main collection contains a floor , and a player with a script which handles an “8 ways movement” logic as seen is https://www.defold.com/examples/input/move/ (script is quite similar, only “left” and “right” movements are allowed).
The only way to allow the player to naturally fall on the ground, and to stay there without falling off, is to setting the floor’s collision object to “STATIC”, and the player’s one to “DINAMIC”. But that settings won’t allow me to control the player through keyboard (the player will stay there, still and frozen; I used some “print()” functions around the code to check if it’s run, and it is, but the player doesn’t move).
The only way to be able to move the player though keys, is to set the player’s collision object to “KINEMATIC” and the floor to “STATIC”, but by doing so, the player will have no gravity on it! And I would be able to let it go through the floor.
I tried to build the project using the physics debug (in game.project),
I made sure the collision boxes were big enough,
and found out that when player (KINEMATIC) and floor (STATIC) overlap, the debug shows two arrows pointing up. I’m not sure what they mean.
Another hack I tried to use was trying to set the floor as DYNAMIC and the player as KINEMATIC. The 8 ways movement works, and there is collision between the two objects, but this method fails miserably because the floor must have a mass greater than 0, without which the floor will fall off too.
I applied the collision objects exactly as shown in one of the old official tutorials (the frog running)// delete thread.
Using Editor 2.
What did I do wrong?
Thanks for the help.