CharacterMotor with rotating world

I have a world object with 6 child planes forming the inside of a cube. My player uses the characterMotor is inside this cube but is not a child of the world. I want to “flip the direction of gravity” by rotating the world and then placing the player at the same spot it was in relation to the world before the rotation. The problem seems to be that if my player is touching the world when it rotates, the player gets pulled along with it. How can I have my player not move at all as the world it’s resting on rotates. I’m using transform.rotation = Quaternion.LookRotation to rotate the world.

Weirdly when I try to explicitly set the transform.position of my player, things go really weird and the player ends up being outside of the cube and falls upwards into the sky. Is this just a bug in unity or what? printing the player’s position says it’s at (0, 9, 0) but it’s really at (0, 28, 0) as far as the editor knows??? What?? Makes no sense.


The CharacterMotor script has code in it to detect when the player is standing on a platform and to make them move with it if it moves. I assume that has something to doing with the problem you’re having of the character moving with the moving world. It appears to assume that if you are on a surface that is moving that the player should move with it.

I’d suggest looking through the script and playing around with these bits if you’re still having trouble.