Today I got the projectile sorted out. The player needs to clench their fists when they want to take a shot and a power bar will go up and down and when they reach the power they want they must release their fists and the ball will be instantiated at the end of the cannon barrel with a velocity determined by the selected power.
The grey bar at the bottom fills with a yellow gradient and then retracts and so on until the player releases their clenched fists.. at that point the ball is fired from the point and rotation of the barrel.
The one problem I have come across which is giving me a lot of problems is the fact that sometimes it thinks you are doing a different hand gesture when you're not leading you to fire bad shots of less than 15 power, I tried stopping this by using an if statement only allowing a shot to be fired if the power is above 15. It has reduced the problems but they still remain, mainly due to the sensor capability.

No comments:
Post a Comment