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 to update the acceleration of the car (sedan) in the blueprint vehicle template during gameplay?

I'm trying to edit the vehicle supplied in the template so that when a key is held down (the E key), the acceleration of the vehicle is increased.

After watching the "2 - Tuning: Top Speed and Acceleration" official Unreal Engine tutorial video I can see that the acceleration can be altered by editing the torque curve (or the Drag Coefficient).

However I cannot find / am unsure of what nodes i should be using to edit the torque/drag inside the Sedan Blueprint as when i search for them, nothing relevant appears?

I've uploaded an image to show what i mean.

alt text

Product Version: UE older version
node_not_there.jpg (387.9 kB)
more ▼

asked Nov 26 '16 at 11:26 PM in Blueprint Scripting

avatar image

Chris Gray
3 2 5 8

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

1 answer: sort voted first


You can simply do this: alt text

The Accel boolean is keeping track of if you pressed E. The IsMoving is just if you are accelerating forward. Every tick I call this HandleBoost event.

more ▼

answered Nov 27 '16 at 02:14 AM

avatar image

2.7k 106 35 179

avatar image Chris Gray Nov 27 '16 at 06:08 PM

Hi, thanks for the reply!

After implementing this solution I got some rather strange results.

The Image attached shows that the velocity is doubling (i chose 2.0 to make this easier to see).

alt text

However when i play the game in the editor, when holding down the E key, the screen appears to shake wildly and the km/h reading on the HUD changes rapidly as well (The video linked shows this).


The time taken to reach the end of the track is also not decreased when holding down the boost button compared to just driving normally (should be quicker because the acceleration should be increased?). Both tests took the car approx 34 seconds to reach the end of the track.

velocity_check.jpg (426.6 kB)
avatar image NoobsDeSroobs Nov 27 '16 at 06:59 PM

You have to be careful with how much you multiply it with. I ised 1.001 or something. What it does is that every tick when it fires, the speed is multiplied by that number. So the final dpeed that frame is the stamdard accel + 0.001xcurrentSpeed. If you use 2 you double the speed every tick.

You only do it every time you click the boost button, I think. That is the problem.

avatar image Chris Gray Nov 27 '16 at 08:28 PM

Ah okay i see! I previously thought the float was how much the acceleration value was being multiplied by. Thanks very much!

(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