Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I can't upload the project because I don't have rights for every asset in the game. But the push is not hard to do.

When I poke and the trident is at the max point, so in the middle of the animation, I use an Area2D and get all the humans that are overlapping this area.

For each human I call the push/poke function that exists in their script and send over the direction they need to be pushed which is the direction the devil is facing, so if he pokes to the right side, the humans need to fly to the right side as well.

In the push/poke function in the humans script I just set the velocity to values based on the direction. So when they need to fly to the right I set the velocity.x value to a negative value. I also set velocity.y to a fixed value like -50.

Then I just move them with thie velocity and apply gravity to the humans so they fall down again after a while. Then when they touch the ground, the push back is over and they continue moving around.

If you need help with this, feel free to contact me on discord: marcushimself