Help requested! Character does not rotate while standing on a platform that is currently rotating

Hello, I am currently working on a third-person perspective action game. My end-game intention is to use directional gravity so that the player’s character can walk on a sphere. I will be having this sphere rotate.

I apologize in advance if any of what I type in this appears aggressive. (Emphasizing points by ALL CAPS to pinpoint non-negotiable aspects of the project as it stands)

I currently have my character’s movement just the way I want it while the sphere is standing still. Here’s the combination of facts that leads to the problem I am facing -

  1. I will be starting out by using and editing the default third person character that the engine has pre-built. I will not be making a pawn or some arbitrary non-character actor.

  2. Use Controller Rotation Yaw MUST BE DISABLED. (same is true of pitch and roll)

  3. Ignore Base Rotation, Use Controller Desired Rotation, and Orient Rotation to Movement MUST ALL BE DISABELED.

  4. Go ahead and create a flat-square platform and set it to rotate. Have the default third person character stand on this platform. If you have the above settings all set to disabled, you will see the character not matching the rotation of the platform.

What I am asking for is a way to get the character’s relative Z-axis (turn left/right) to match the platform as it is rotating beneath the character. (NOT the character’s world rotation) Almost like a way to emulate the character rotation if any of the above settings were to be set to true (without setting them to true of course).

I imagine that I would have to use some sort of raycast/line-tracing/impact normal method of some kind to get the character to rotate as desired but I cannot for the life of me seem to grasp how to go about doing this.

I am also willing to go into the character/movement C++ code and make edits as suggested if a blueprint solution is not available.

Lastly, the only rotation that I am trying to edit is the relative Z rotation (turning left/right) based on the rotation of the platform that the character is standing on. I am not looking to see the character lean in any particular direction.

I appreciate any assistance I can get in this matter!

This is exactly what you need to uncheck. Kind of counter productive to disable a built in function for something you want, then trying to solve it manually.

If it doesn’t work how you want it, then I’d imagine you could get the base at every frame (GetMovementBase), save it’s rotation, then in next frame, if base rotation is different than the last, rotate your character with the same amount.

If you don’t mind dwelving into c++, you could override the following function:
virtual void UpdateBasedRotation(FRotator& FinalRotation, const FRotator& ReducedRotation);

1 Like

As stated in the original post, Ignore Base Rotation is unchecked (disabled).

Could you explain the method of saving the movement base’s world rotation and rotating the character’s relative z rotation by that amount? - possibly sharing a blueprint example? - Thank you for your assistance! :slight_smile:

— Edit —
I have successfully gotten the character to rotate on a flat Cube platform that is rotating.

However, if I rotate the platform 90 degrees so that the player character is essentially “walking on a wall”, the player character once again does not rotate with whatever it is standing on.

To see any support this is getting, if you see it and decide to try and solve the puzzle, it would be nice to see a comment - just so I know this hasn’t been buried under all the other forum posts and gone unnoticed.

If this helps, swapping the z to z pins from the break rotator to euler to quaternion with y to z or x to z will work while on a 90 degree-turned platform. However, if the platform is rotating and then rotates on a different axis, whatever pin is currently plugged into the z Euler to Quaternion will not suffice. If we can figure this out, I will have a character that can walk on a rotating sphere.