itch.io is community of indie game creators and players

Devlogs

Fan Obstacle not Moving Player

Shutdown
A downloadable game

Author: Myles Ditcharo

One of my tasks I had to do for Shutdown was make a fan obstacle that pushes the player and object away from it. While making this I ran into an issue where the fan would only push objects but not the player. Also, once the game would finish running, multiple warnings would pop up talking about the player character. For the fan, it needs to be able to apply force to the player because we plan on using it for traversing certain areas, so I had to figure out why.

After some debugging I found that the issue was that the method I chose to apply force to objects did not work well with the character and would cause errors to pop up. To fix this, I decided that instead of swapping the method of applying force, I would check to see what type of object is being pushed. With this, I would see if the player character is about to be pushed by the fan, and I would branch off the main path and use a different method of applying force. This way, I can keep the original feel of the fan when it pushes the objects, and fix the problem where the player character would remain unaffected.

Leave a comment