ball pick up and destroy ball pick up
- Jade Taylor
- Jun 23, 2022
- 2 min read
when we first started planning this game, we were planning on a fairly large play space, along with the worry about players camping which was the biggest issue we had, a way we thought to overcome this would be by making the ball a 'hot potato'. What I mean by this is that the further the ball has to travel the less damage it will do on impact, forcing the players to get close to one another.
however, this feature then became ineffective when the arena got smaller, as this code worked on how many seconds passed from when the ball is fired to when it comes in contact with the player, and this didn't really seem to work, as it would only take a second to hit the opponent.




For the ball we didn't want to have too many in the game at one time, we only wanted a maximum of 6 balls in the match and the player is only able to carry a maximum of 3 balls at any given time.
How I did this is to make it so that when the balls are fired and done with the shot, they will then be transformed into pickup items.
this would happen once the ball drops below a set velocity, however, I did need to add a vector length to make sure that the ball only stops once it is on the ground, as I had issues where the ball could stop in mid-air as it would drop below that set velocity

once the player then walked over to the ball pickup that pickup will then be destroyed creating a new fireable ball.
cross hit marker




I added a hit marker for when the balls come into contact with the players, giving a sense of feedback to the player, so they know when they've got a direct hit, this was mainly needed for when the 'hot potato' feature was enabled, as even if the player got a hit but from further away the barrier wouldn't move, so the player might think they didn't hit them, this might cause some frustration.
But at least with the hit marker, they will know.
Comments