I’m new here and in need of some help.
First off, can someone clarify for me the difference in object shape, circle and rectangle? I’ve noticed that when I set shape of my enemy to a circle it’s sprite kind of “floats”, doesn’t touch the ground when the game is played, and if I change it to rectangle the sprite is fine but the bad guy doesn’t move like he’s supposed to.
And secondly, I made a short animation for death of an enemy: you jump on his head (collision-top), he becomes flat (animation), and then disappears (destroyer). Now, even though the enemy is flat he can still kill you in the span of those 4-5 frames of animation if you collide with it left or right, and I can’t find a way around it.
Here’s a link to the game (not actually a game, more of a training area for me, until I learn how to do stuff…)
Hey kvad, welcome
The circle vs rectangle select in the physics settings lets you determine what shape the physics engine uses for collisions. Rectangles are usually better for environment blocks, while circles are usually better for moving objects like characters. Rectangle objects can still move around, but you may need a bit more force to overcome the additional friction.
To better visualize what’s going on behind the scenes, you can press “ctrl+d” while your game is running, and this will render the underlying physics shapes.
To fix your “dangerous while flat” enemies, how about using a switch to disable the damage from the enemies while they are flat? You could just turn the switch off when you flatten the enemy, and use that to disable the damage.
Hope this helps, and good luck on your game
Thanks a lot! I’ll look into it
Here’s a tip as well. I have my enemy Spyker scorpions cut apart. When they move, it’s a constant animation. The actual boundary sprite is just 4 dots in a rectangle shape in the middle of the white drawing area. The reason I did this is because now the Spykers boundary doesn’t have the legs, so in the animation, the legs touch the ground. I also have the advantage of a flat surface to jump on it, instead of round.
. _ .
. _ . Something like this. If your animation is “always” it will never play the boundary frame.
WELCOME KVAD!!! sorry, i love new members i was just having a little party! XD
And thanks grazer i might use a switch to turn off the damage when the purple slime is flat in mega adventure