How can i change Actor's gravity when i press downward key (UE 4.27.2)

i want to make change Actor’s gravity when i press downward key and if i release key set to original gravity by blueprint
(UE 4.27.2)

Hi Aero,

In your blueprint actor set Class Defaults → Auto Receive input to “Player 0”

Enable ‘Simulate physics’

Then you drag a reference to your mesh and trigger gravity changes on press.

I just tried this with a cube, there’s something fun/satisfying about even simple physics ideas. :smiley:

1 Like

Thank you for reply

but i just want increase gravity when the key has been pressed (gravity is already exist)
when i press downward key →
character’s gravity get increase → fall fastly to floor → release key → return to original gravity
this is exactly what i want to make

if u have answer about this
can u reply to me?

Hey @Aero_cs,
When it comes to specific objects like this you may just need to look into Gravity Scale. Physics objects have a linear damping option, but not an option to change the equation at which gravity is applied. Gravity is a constant that applies to all physics objects in the scene. Increasing the gravity scale may be what you’re looking for.
I hope this helps!
-Zen