How do I allow input to decide the launch speed of my player controlled ball (roller game style)
Hey, so what I'm looking to do is have a player controlled ball (just like in the roller game example). What I want is to be able to do is allow for input (W Key for example) to decide how much speed the ball will begin moving at or launch at. So for example when you begin playing the game, the player will hold down the W key and the longer the key is held the faster the launch speed will be with a maximum launch speed that cannot be exceeded and during the time the launch speed is being set the ball will be stationary and it won't be until the ball has launched that the player would gain control over the movement of the ball.
What I have at the moment is a player controller node for the ball that has X and Y vector components for torque that give the basic movement for the ball (just like in the roller game example) and an attempt at setting a launch velocity, which I learned from an earlier post, I'm sure the answer I was given to set it up is correct and that I'm just setting it up wrong or going about it in the wrong way but I'm not sure but here is what I have set up
All I get when I run the game is the same movement that I get from the X-Y torque set up that you get in the roller game example and the Initial Launch section is ignored / has no effect. Any help is much appreciated.
asked Jun 04 '16 at 12:44 AM in Blueprint Scripting
Hey! I recreated this how I would do it:
Not sure if it makes difference tho. One thing is that you must include delta seconds into the count, otherwise it's framerate independent. Hopefully this helped, cheers! (psst, if it helped, I'm begging for some karma, since I really want to beat Luos in leaderboards... ty)
answered Jun 04 '16 at 04:12 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here