How can I change the torque to make a boost effect?

Is there a way to modify the torque curve throught blueprint to make a boost/nitro effect?

If not, how should I go about it?

The mentioned this in the last twitch stream and they found that they had not exposed something needed for boost effects. I do not know if they exposed this before they released 4.2 or not.

Hi Zeustiak,

       I have found if you add an impulse down the -y it will give you a forward impulse which acts like a boost now. Now I got to set it up so it stays on while the button is pressed.

Dan

Hi Zeustiak,

      Ok That adds an impulse off of the world position. What I am trying to do now is find a way to add the impulse to the players vectors. How I am going to do that I could use some help if anyone has an Idea.

Dan

I made it in C++.

Added a second engine (turbo one) to the actor and then swaped.

In the Class Header

/** Turbo Engine **/
UPROPERTY(EditAnywhere, Category = Turbo)
FVehicleEngineData TurboEngineData;
  
/** Activate Turbo **/
UFUNCTION(BlueprintCallable, Category = Turbo)
void ToggleTurbo(bool b);

Implementation

void ABaseVehicle::ToggleTurbo(bool b)
{
  UWheeledVehicleMovementComponent4W* Vehicle4W = CastChecked<class UWheeledVehicleMovementComponent4W>(VehicleMovement);
  
  if (b)
    Vehicle4W->UpdateEngineSetup(TurboEngineData);
  else
    Vehicle4W->UpdateEngineSetup(Vehicle4W->EngineSetup);
}

This was posted under blueprints. Anyone know how to implement this with blueprints?

An alternative way to implement boost in blueprint, is to start adding an impulse (force vector) at the center of the car, aimed straight ahead. This will work more like a “rocket” than like a “stronger engine,” but for many arcade-style racers, this is actually what you want.

Adding an impulse to the center of an actor is simple in blueprints. You just need to make sure you do it every tick for as long as the boost is enabled.

I’ve Have tried that and it always adds an impulse to the world translation and not the vehicles translation. Basically it adds an impulse to the worlds X and not on the players X. If you know how to change this I would greatly appreciate the help.

Easiest is to get the forward vector of the body in question, and adding that as the impulse (scaled.)

This is from an impulse based hovercraft simulation I made. “Self” is the pawn, and “Chassis” is the main body. The two scaling factors are for steering (0…1) and for tweaking strength of propulsion (0 … lots)

Thank you. My function isn’t showing a return node. How did you set the chassis bone in blueprint. It told me it can’t connect to a primitive component. What am I missing?

The primitive component (named “Chassis”) should be the main body for the car, rather than the skeleton bone.

This ain’t working for me. This is what my blueprint looks like.

http://puu.sh/aHQax/57d81056df.jpg

Hi There!

This is what worked for me! AirSlicer is the Vehicle Pawn I use. Everything else should be obvious as to what they are. The ‘2’ is the factor I multiply it by.

When you say “ain’t working,” what is the actual effect you get? What happens when you put a breakpoint before the failing step?

It means I don’t see any effects. How do I set up breakpoints? Got any links?

Thanks for the C++ code, though.