Charging a shot
Posted: Mon May 12, 2014 3:22 pm
Not sure if this is the right place to post, but i'm gonna give it a shot.
My assignment requires me to create a FPS shooter, and 1 of the fuction is to allows the user to shoot a ball.
It also allows the user to charge the shot by holding down the mouse button.
I need some guide on doing the charged shot.
What I had in mind is to implement a for-loop, and while the button down state is true, the force will keep adding until the user release the button and the shot is fired.
But so far I couldn't achieved that with the for-loop.
Anyone can guide me on this? I am a bit lost here and the google search have not been too kind to me.
I am using Ogre + Bullet physics.
My assignment requires me to create a FPS shooter, and 1 of the fuction is to allows the user to shoot a ball.
It also allows the user to charge the shot by holding down the mouse button.
I need some guide on doing the charged shot.
What I had in mind is to implement a for-loop, and while the button down state is true, the force will keep adding until the user release the button and the shot is fired.
But so far I couldn't achieved that with the for-loop.
Anyone can guide me on this? I am a bit lost here and the google search have not been too kind to me.
I am using Ogre + Bullet physics.