0
\$\begingroup\$

I'm making a game in UE4.25 and I have several obstacles in there. I want them to send the player in the air if the player walks or stumbles into them. (Kind of like a Fall Guys effect, like if you get hit by a nearby falling ball, you fall into the void or something.)

Is there a possible way to do this?

\$\endgroup\$
0
\$\begingroup\$

You can apply a force to the character when they trigger the obstacle. Use AddForce if you are using blueprints or UPrimitiveComponent::AddForce if you are in C++.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ For a sudden launching effect, rather than a gradual levitation, you may prefer AddImpulse - this represents a single sharp kick, rather than an acceleration over the duration that the object remains in the force field. You can always scale up a one-time force to act like an impulse for a given time step, but if your time step changes, the motion you get from that force also changes, while impulses stay consistent because they don't integrate over time. \$\endgroup\$ – DMGregory Sep 30 '20 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.