Collision #1






From Behind to Front
Today I worked on creating and setting collisions between the game world (World), the player (Player) and the enemy (Enemy)
Without physical collisions there are no blocks preventing you from passing a “wall”, resulting in the player being able to pass through physical elements of the scenario. This needs to be handled well…
The first thing I did was create the appropriate CollisionShape for Player and Enemy, to cover the entire sprite.
Once I tried it I realized that something was wrong.. the player seemed to pass behind the enemy’s feet in a completely unnatural way.. aarghhhh!!
By appropriately setting the collision layers and the y-sort property of the parent node (World) I managed to obtain the effect I wanted: the player naturally passed behind or in front of the enemy, however now there was another problem to solve!
By leaving the shapes in full body there was no margin between the sprites: the player could only pass when the entire sprite was completely in front of the enemy and vice versa from behind… it was horrible!
The solution was to reduce the shape of the player by excluding the head (the part that would therefore NOT collide anymore), and in the case of the enemy, reduce it only to half the body
So finally the effect of passing in front of and behind the enemy seems realistic! YEAAHHH
The next step is to make this damned enemy move!
Eternal Light
My journey into pixel art & indie RPG gamedev – one step at a time.
| Status | In development |
| Category | Other |
| Author | DeusDev |
| Genre | Role Playing |
| Tags | devlog, Godot, Indie, Pixel Art, work-in-progress |
| Languages | English |
| Accessibility | Subtitles |
More posts
- Character #2Oct 20, 2025
- Characters #1Oct 19, 2025
- WorldItem #1Oct 13, 2025
- Animation Manager #2Oct 03, 2025
- Animation Manager #1Oct 02, 2025
- EnemyManager #2Sep 23, 2025
- EnemyManager #1Sep 21, 2025
- Input System #1Sep 20, 2025
- Character #1Sep 18, 2025
Leave a comment
Log in with itch.io to leave a comment.