Can I invert gravity for only one player in UEFN?

Hello,

I am new to UEFN but I have worked with UE before. I am wondering if it’s possible to invert gravity for only one player at a time? As in, a player can press a button and suddenly they’re falling upwards. Press the button again and they raise downwards, etc. These shenanigans happening independently of other players’ own gravity. Maybe even switch which objects are attracting the player at a given time?

Would this be possible for vehicles being driven as well?

I ask because I have found that UEFN has a lot of guardrails and fool-proof safety walls. Since I have found no documentation or tutorials concerning custom gravity components, I can’t help but wonder if it is even possible.

I’d be thankful for any clarifications or ideas regarding the topic of gravity in UEFN.

Hey Johnathan Smitherton,

Unfortunately the gravity is only down you can also set its strength value to 0 G,

To set the gravity for an area you can use a Mutator Zone, make it as big as you need to cover the area, it also has other settings that you’ll have to go through like allow building and weapon fire.

You’ll have to experiment with this probably at 0 G and maybe in conjunction with the Movement Modulator Devices to push you around, I’m guessing 1 for each direction, haven’t used them before so I’m not sure on thier specifics.

Using the button interaction event to activate the movement modulators.

There are also player classes, where you can specify different stats and player character types. Specific classes can be also be effected while others are not, lots of devices like the mutator can be set to only affect 1 class or team and used to single out players for effects.
Class Selectors change the class or team by events or players entering thier zone, Class Designers set up the class and Team Settings & Inventory Devices set up teams.
Class Settings override Teams settings and they both override Island Settings.

1 Like

I was able to work something out with this code: https://forums.unrealengine.com/t/is-there-a-way-to-set-gravity-to-zero-in-uefn/1883070/7 . But I switched the zero gravity value for -9.81. This makes characters shoot upwards when entering the affected area. I would imagine that, for gravity wells and planets, I’d have to go for 0G and follow your advice to push rather than pull.

Anyway, with the gravity customizer in the link, the device makes characters shoot upwards, but the camera gets wonky when the character reaches the ceiling (naturally). Vehicles were unaffected by the device. Guess I have to keep coding to make that happen. Still, I suspect that even then, the character won’t be able to walk on the ceiling on account of being in a perpetual falling state. Same for vehicles.

So the question remains: is the idea feasible in UEFN? Are there too many guardrails that would prevent an Escher-esque level?

Escher stairs…
If verse is capable of orienting players upside down, I think its feasible, but I am not well versed, and have no idea there.
Now that you’ve tested with negative numbers, the possibility to use multiple mutator zones, some for up, some for down, some freefall.
like a down zone on top of stairs and an up zone underneath, with some transition zones.

A convenient way to divide up the room into zones may be to use external volumes to represent the mutator zones.
Construct a bunch of models for reference by Volume Devices to create mutator zone usuable volume shapes.

The clincher is player orientation though, I guess if thats possible, then it wouldn’t be too much of a stretch to pick a singularity point with strength of pull/distance from point and orientation related to direction of point from player.
I wonder if verse is ok enough to constantly update all player transforms to suit a gravity well or a few.

In UE, the player can be rotated and the IsFlying boolean can be switched, would UEFN allow for any such hacks? Ref: How to walk on ceiling? - #2 by anonymous_user_a2509f6c

I’m not sure whether UEFN would allow so many rules being bent. Let alone allow characters and vehicles run upside down or while in a “free fall” state.

1 Like

I have an idea where vehicles crawling on the ceiling is part of the gameplay.

In a previously cited example, the mutator zone could invert gravity for the bipedal character but not for a vehicle. Very likely I’d need a modulator instead.

The documentation for modulators, however, doesn’t include gravity, although a sufficiently high upward force could simulate upward gravity… if only the rest of the physics would behave accordingly…

Again, I’d be super thankful for ideas on how to reliably invert gravity in UEFN.

1 Like