Hey , I wanted to share this news with the community, I managed to build a Movement system that supports Dynamic Gravity for characters in any direction along with walking,falling and full multiplayer network support.
It is a custom Character movement built by extending and modifying the code of original UCharacterComponent of UE4 (Full source code aspect of UE4 Paid off )
Here’s a demo (Pardon Low FPS old PC )
A detailed description of whats happening:
We’re hopping around different platforms which have their own gravity fields , The character stands upright when it lands on a different gravity platform and can walk on it or jump etc.
1.when you are not in any gravity field you are free floating and moving with conservation of momentum.
2.The Wireframe boxes and sphere represent the gravity zones of objects.
3.When you are in a box the gravity points directly towards down direction of the box.
4.When you are inside sphere (The red ones) the gravity is acting towards center of the sphere.
5.The global world gravity of map is zero.
- The Movement component tries to correct player’s orientation to align with gravity when possible and set to do so (which enable walking on spherical objects)
**The Gravity Regions (Wireframe Boxes and spheres) **are their own actors separate from the solid meshes , Hence they can be attached to anything or whatever , they are purely gravity field. As such any kind of Gravity field with any shape or gravity distribution can be used.
Sphere Gravity Field
Box Gravity field (Red arrow represents Direction of gravity in the box)
When you look at dark void and there are no shiny stuff around you can see the milky way and stars. The player standing upright when landing is a behavior written in the character class and not part of the movement component hence any kind of behavior can be written including falling down and then standing up instead of just turning straight up
This custom as a component for my own personal project Solar Frontier but I think this is much stable and flexible to be used anywhere and not just this particular project
At this moment only Walking and falling mode is supported , but other modes like swimming is rarely used in a dynamic gravity environment and can be added easily anyway
I don’t think anyone knows about my project solar frontier but just in case you want to see it here’s an old video :