Large Moving Platform and Dynamic Gravity Issues: Character won't stay grounded

wuche

Member
I am building a game where instead of the camera following the character, instead the entire game world moves, rotates, and scales to achieve a certain perspective viewing a target origin transform. Because of this, the game world and the character should be able to operate in a hierarchy where a parent is constantly being repositioned, rotated, or scaled.

I figured the combination of UCC's Moving Platform and Dynamic Gravity could be a perfect match to accomplish this. To prototype this concept, I altered one of the moving platforms in the Demo scene's Dynamic Gravity zone and scaled it up by about 100x (this would likely need to be 1000x for the actual game world eventually). I then moved the Atlas character onto it to see if it would behave as expected.

Here are some issues I noticed:

1. Atlas is able to successfully stay and automatically re-orient it's Up and Gravity Direction properties when the moving platform is at it's original scale without issue. Atlas will stay on the platform even when it is rotated at an "extreme" angle, meaning that the platform is perpendicular to the world Up. However there is an arbitrary amount of scaling the platform that causes issues, and Atlas can no longer stick to the moving platform at extreme angles.

2. When scaling up the moving platform beyond some arbitrary amount, Atlas can no longer even get onto the platform. The platform simply moves through Atlas as it goes through it's waypoint loop.

Besides this experiment, I also made a minimal scene with the base Atlas prefab instantiated and a simple moving platform that I took from the demo scene. My instinct was to update the Atlas clone's Up and Gravity Direction on each frame on the Update method to be the moving platform's transform up direction and the negative transform.up direction. I noticed that in doing this, it made the character unable to stick to the moving platform when rotated beyond some rotation on the platform's X axis (seemed to be around 35 degrees, which is not that much). Whereas if I did not update the Up and Gravity Direction, it managed to stay on the moving platform at more of an angle. But the problem without not updating the Up and Gravity is that the character is not oriented to the normal of the moving surface, it's body is still upright in the world up direction, as if it's climbing a steep hill rather than just standing on a rotated ground.

I did some research on the forums and noticed that others have had some issues with large Moving Platforms, so perhaps these issues are related to that?

I have built an entire game using UCC and Behavior Designer in the past before, and would love to be able to use these tools again for my next one! But this is a big blocker for me to do so, I need to be able to get a successful prototype working where the character properly can move around from a top-down perspective on a massive game world platform that re-positions, rotates, and scales in real-time. Any advice here would greatly appreciated, especially on how to properly combine the Moving Platform and Dynamic Gravity systems! Thanks and Happy New Year!
 
Ah, I think the Align to Ground character ability is leading me to the right direction. Will experiment some more with it and confirm once I hopefully get it working!
 
Using Align to Ground makes sense. While Align to Gravity Zone is similar it isn't taking into account the scale of the platform so unless you create a new ability it won't know how to align.
 
Top