Journal Entry 3: Fixed Movement and Meteors
Date: 12. 9. 2021
My first task today was fixing some issues with the player movement. The player got frequently stuck even on level ground and jumping only worked sporadically. My suspicion was that the first issue was caused by the tilemap colliders being several squares instead of one single rectangle. I fixed this by using CompositeCollider and merging all of the squares together. The issue of jumping was pretty mundane, turns out I used GetButtonDown, which only reports button press event on the exact frame it happened. I changed this to GetButton and also simplified the ground detection with ContactFilter.
Creating meteors was simple, although it took me a while. First I sliced another spritesheet. Then I created sample meteor object with SpriteRenderer and PolygonCollider I set to trigger mode. I had some issues with the meteor not detecting collisions with the tilemap collider, turns out the tilemap rigidbody should have been set to kinematic instead of static. Once I had this figured out I proceeded with adding a trail, writing some code for meteor movement and spawning. For testing purposes I made meteors spawn when the M key is pressed.
Files
Get Don't Be Afraid To Fall
Don't Be Afraid To Fall
Status | In development |
Author | Martin Mihálik |
Tags | mff-gdintro-2021-c |
More posts
- Journal Entry 10: Time is upSep 19, 2021
- Journal Entry 9: Change of PlansSep 18, 2021
- Journal Entry 8: Finished Refactoring and Repeating WorldSep 17, 2021
- Journal Entry 7: Pausing and RefactoringSep 16, 2021
- Journal Entry 6: Walls and Automatic Meteor SpawningSep 15, 2021
- Journal Entry 5: Rubble Collection and Damage SystemSep 14, 2021
- Journal Entry 4: Explosions and RubbleSep 13, 2021
- Journal Entry 2: Terrain and Player ControlsSep 12, 2021
- Journal Entry 1: The Design and PlanningSep 10, 2021
Leave a comment
Log in with itch.io to leave a comment.