How to make and use a curve in blueprints
Maybe the question is not very well written. So let me explain myself.
I am making a car game demo (Think F Zero X) and I am working on the boost for the game. What I want to do is to scale the velocity by a factor that depends on the current velocity of the vehicle. So for example, if you go at 500u/s then when you go over a boost you reach 2400 u/s by simply taking 500 and multiplay the velocity vector by 4. How ever if you reach 3000u/s, then when you use the boost it shouldn't boost you too much, up to 3300, so a scale factore of 1.1.
This is a paint mock up of the curve I want to make.
I know I can just draw this curve in Excel, find the trend line and apply a function in blueprints. But having a visual timeline/curve that I can edity by itself would make the tweaking process much, much easier.
This is the current blueprint I am using. As you can see, I get the velocity, then find the magnitude (POP POP!) and I can apply another function to find the appropriate scale factor to use.
asked Aug 07 '14 at 01:41 AM in Using UE4
Create Curve Float blueprint, inside you can create the same graph
then inside your vehicle blueprint make 1 variable CurveFloat, then assign this blueprint in, to use this just call get float and input speed inside.
answered Aug 07 '14 at 05:38 AM
You can create a curve under miscellaneous in the create dropdown. Also if you have a maximum you could use a clamp to put a limit on the topspeed.
answered Aug 07 '14 at 01:48 AM
better to use a pure function to get that curve. this way it won't 24/7 waste RAM on that useless reference. also do that for everything you can. pure functions are simply better than a reference as long as you need it read-only (const).
answered Feb 02 '18 at 03:59 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here