How to change gravity direction with blueprint?

Hi everyone. I’m trying to find a way in which I can change the gravity direction for my main character (objects could be affected or not, it doesn’t matter right now). Is this something I can do on the level blueprint? or the charater blueprint? is this actually possible via blueprints? Any help is appreciated.

You can affect the scale of gravity. In your world settings for a level you can enable global gravity and make all objects fall faster or slower or even make them fly up.

Here’s a video of how to do the world settings gravity thing:

You can play a little with individual actors and how much they are affected by gravity.

That’s all you’ll be able to do via blueprint though. If you want gravity to work in all directions you’ll have to dive into C++ and engine source code.

Cheers

Is it possible to reverse gravity in-game?

Hey . Thank you for your answer. Yeah, I don’t want to play with the scale of gravity, but direction of it. So, I’ve been playing with Physics Linear Velocities and that is starting to give me a lot of new problems… I think that is the way to go, but I’m hiting so many walls at each step I take. What I´m thinking is to have 6 gravity directions, positive and negative for each 3D axis… But my blueprints are starting to look like a real mess… I wonder if there is an easier way to do this…

Well in an older project I helped with they went into the engine sourcecode and forwarded the full vector instead of just the Z axis for gravity allowing them to instantly change the gravity in any direction.

With blueprint only all you can really do is write your own custom character movement (starting with pawn and not use the character movement component). Get rid of all gravity and implement your own thing that just adds a force to everything in a direction.

C++ really is the way to go here.

Yeah, I think you are right. I think I’m going to ask a friend’s help for this part. Thank you !

Short anwser, you can’t. Gravity Vector is hardcoded for most things.

Long answer, you can set GravityZ to 0 and add a custom acceleration to all actors in your own gravity direction. Problem is that you have to do that for every actor that you want to be affected by gravity.