x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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

alt text

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.

Product Version: UE 4.11
Tags:
more ▼

asked Jun 04 '16 at 12:44 AM in Blueprint Scripting

avatar image

bool'
1 3 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey! I recreated this how I would do it:

alt text

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)

more ▼

answered Jun 04 '16 at 04:12 PM

avatar image

Derzo
691 28 8 50

avatar image bool' Jun 04 '16 at 11:56 PM

Hmm, What are your default values for the "Impulse" and "Max Impulse" Variables? Because when I tried this set up I had the same result as before where the ball moves as it would before hand. When I removed the X-Y Movement components to see if something I had in place there was causing an error nothing happened to the ball when I tested it just remained stationary.

Thanks for the help you have given already, I'm not quite sure what it is that I'm doing wrong, If you have any idea what it could be let me know, I can attach any images or anything if needed. Cheers.

avatar image Derzo Jun 05 '16 at 06:40 AM

Hmm. I also didn't test this, I just made a quick blueprint. But I assume you really need to overexaturate the values, like 5000000. How about checking the Accell Change or try using Add Radial Impulse instead?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question