Is there still no simple solution for adjusting gravity direction?

@

I’m aware of this.

I agree! But there are plenty of games that use manipulation of gravity as a game-mechanic such as: Star Citizen, No Mans Sky, Prey etc… Just because Star Citizen *specifically *is not mainstream (partly because it isn’t done *and *the developers are managing the game poorly imo) does that mean we shouldn’t expect such a feature? or even ask for it?

As for my quote about this:

I worded it poorly, what I mean’t is that having gravity direction *as a feature *is only going to get more popular as the industry moves forward in all genres such as puzzle games, sci-fi etc… I didn’t necessarily mean that space games are going to get more popular.

I’m unconvinced that this will be a dramatic set-back. Technically if the new code is a single line longer, your statement remains to be true. But is it fair to bring it up as an argument against such a feature? By how much is “more netcode”? Also, even if there is *“tons more netcode” *(and that’s pushing it) couldn’t such a feature simply remain as single-player only? I’d rather have the feature only work for certain types of games, than not there at all.

I’m not going to address this last statement because it seems more like an opinion piece than an actual technical statement backed by evidence. How can I even begin to respond to this when you say things like “at the expense of all it’s users”. Most of UE4’s users are hobbyists that aren’t squeezing every last drop of performance out of CMC. The professional developers that are, can simply create a separate class with stripped back/simplified code.

I agree with your overall sentiment on the basis that:

  • adding such a feature would be a significant detrimental cost to both epic games’ employees (pulling them away from more important features) as well as the UE4 community (with the negative performance impact on machines).

But I have yet to see any evidence that that will be the case.

Thanks! I’m checking out the link. It seems like this might just solve my problem. :slight_smile: When I added force to vehicles using the blueprint node “Add force”, this had undesired affects. I’m hoping that adding force using the code:


PVehicle->getRigidDynamicActor()->addForce(blah);

Will produce the desired results.

EDIT: I’ve just implemented the code and it had the same undesired affects as the blueprint “add force” node… aka, the vehicle doesn’t move when “pressed to the ground”. The struggle continues.

@AndrewM47 did you get any further with this?

Yes and no, I got direction gravity to work in real-time but it affects ALL objects in the world that use gravity (including player/vehicles). But I never could figure out how to change the gravity on a per object basis. It IS possible, I just never found/figured out which class actually ‘sets’ or ‘gets’ the gravity on an individual level. I will eventually take another crack at it in a month or so when I get free time. Hope this helps. However, the best solution would be one from epic themselves. So message the staff or put a feature request in if you need the feature sooner.

Would mind running through how you did this? I’m making a multiplayer planet based game and need to fix the gravity of to the center of the planet (directional gravity). I’m happy to build the engine from source to do so, would you mind detailing exactly what you do to get this working?

2 Likes