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"

Gradually increase acceleration on key hold?

Hi, been working on a down slam ability that increases downward acceleration the longer you hold the key, currently it's set up with a timeline with manually placed keys which isn't scale able, is there something like the ^2 float node with more customization?

Product Version: UE 4.21
Tags:
more ▼

asked Nov 14 '18 at 07:07 PM in Blueprint Scripting

avatar image

Messik
1

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Why don't you just use the timeline or a timer with a separate variable to keep track of acceleration. Just have the timeline/timer add "X" amount to the start value until the key is released, once it is, stop the timer/timeline, use whatever value "acceleration" is at, and when finished reset the value to 0 and you will be ready for another attack.

more ▼

answered Nov 14 '18 at 08:51 PM

avatar image

Nebula Games Inc
4.5k 26 9 14

(comments are locked)
10|2000 characters needed characters left

You can set up a float variable (delta-accumulation) and start adding delta seconds to it when the button is pressed down, maybe add a upper limit value so that it does not rise infinitely. Then multiply this delta-accumulation to your base acceleration. You can have another co-efficient variable(which is just an arbitrary constant) to multiply to the delta accumulation and base acceleration. The co-efficient can be be used as a scaling factor for how you want the delta-accumulation to affect the base-acceleration.

final acceleration = base-acceleration x delta-accumulation x co-efficient

Note: Reset delta-accumulation to zero when the button is released

more ▼

answered Nov 14 '18 at 10:47 PM

avatar image

Raur
16 5 5

(comments are locked)
10|2000 characters needed characters left
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