Dynamic gravity for characters

After a day’s break it started working O.o’ just like that. Thanks! Brilliant thing :smiley:

Is system applicable to Vehicles? It would instantly solve ourproblems with completing Track Loops.

The gitter will always happen as the server is trying to set the player to the location it thinks the player should be and the client it trying to set it to its own location and they are basicly fighting each other for the position.

Once you have both the client and server in sync gravity wise then that gitter should go away. I haven’t dug deep into the code to see what exactly that entails yet.

is awesome!!! I hope will be added to next major release.

Question: as I understand from the video, the character cannot walk from floor to wall at 90°, so you have to put a little curved ramp between them? Is that right? Example: Unreal Engine 4 - Dynamic Gravity for Characters - YouTube

Actually that totally makes sense, because otherwise you would need special animation for the big step.

Can’t wait to see it in official release.

Thanks , muchas gracias.

Vehicles aren’t characters, as far as I know.

You could listen for wall hit events in blueprints, and change the gravity direction in that moment to align to wall surface. Just a slight reposition would be needed depending on capsule height.

Gravity works great, other than the rotation issues. (which I just haven’t had time to address yet)

Does anyone else have a broken Camera Vector with build? I can’t use camera vector or any children of that (reflection vector, fresnel, etc).

Someday could be included in Unreal Engine 4 official Code. Like was spider walk, which has been in UDK! is a physical phenomenon as important as the gravity is, which should have already been implemented in Unreal Engine 4 Code for non-programmers, or Blueprinters guys. Something, as proposed by in 01/27, something able to support any sort of gravitational influence, one or multiple influences, can be very interesting!

I am a part of the Epic games organisation, aswell logged in. I cant seem to find it. It may be my little to no experience with github. When you say “You have to get my pull request” does that mean clicking the link, because that still gives me an error. Hopefully i missed something simple

Hey and ,

Thank you for creating it is a really awesome ! I tried that code in 4.9.2 and it compiles.
Edit: It works perfectly!

Keep up the good work!

Hey all,

I updated for 4.10. But even better, I also made some other modifications to give the engine a non-Z dependent gravity. Here you go!

OOOh yeahhhh, nice work man, I’m going to try and test out today.

Is there any further updates on integrating into the main branch?

Is getting the source and compiling the engine and modification just like any other library? - Download code open up the visual studio solution and integrate, Compile and away I go?

looks amazing, AWESOME work!

Hello there chaps, and thank you for wonderful piece of code. It’s been a blast to use so far.

I’m currently trying out a a first person project (I loaded the ShooterGame example on top of the 4.10 version by glazed), and I’m having troubles with the camera. Two separate troubles to be exact. I have tiny tiny planets that one can walk around - the code turns the capsules and my own overlap calculates a new gravity direction, but I run into troubles with setting ViewPitchMin/Max and ViewRollMin/Max. I just can’t get my head around how to get them to recalculate based on gravity direction. The other trouble I have is with recentering the camera when I walk - what I mean by is, as I walk forward on a tiny planet, I would like to see the horizon all the time instead of my view slowly climbing up.

Anyways, all ideas appreciated. Thanks again for the code, it’s fun!

Hello, I am the developer for the Orbit and Gravity plugin, its a plugin that calculates Newtonian gravity (so gravity based on distance and an object size constant) and does orbital mechanics calculations. Someone pointed me to thread asking about if it was possible to integrate the orbit plugin with one. It turned out to be very easy, and I made a quick video showing how. It turned out to be a pretty cool effect I think. Video is below…

=2sJ9JWnlTtw

well, logged into github and still the gives a 404… weird.

I’m updating my original 4.7 character subclass (that was never shared) to 4.11.1, with additional adapted code that includes replication (network code).
The intention is to share to avoid a full compilation of the engine, as you would just copy my code to your new or existing C++ based project.
also might help Epic for testing functionality, if the arbitrary gravity is really implemented in the engine.

You have to have a github account and request access to the EpicGames repo.

Excuse me but how do you do please? How do you request access to the EpicGames repo? Its probably a daft question but would really like to know

I’m updating to 4.11 version and got it working, but seems like I got some issues with the movement replication (sometimes I got an offset between the client character position and the server character position).

Is there any better implementation or some information about when epic will add on the release branch?

I will try to fix the replication problems, but I leave here the cpp and h if someone wants to use it or help me.

cpp: https://drive.google.com/open?id=0B2t6LXK5hAzUXzBfSHlPakhpeXc
h: https://drive.google.com/open?id=0B2t6LXK5hAzUZWJla1BORDRfM3c