Pawn relative movement trouble over a rotating platform

Hello! I am quite new to this, but whatever.

I am currently trying to make my pawn to freely move over a rotating platform. I simply do this by attaching my pawn to it, so that the pawn can make relative movements and stuff over it.
However, I am dealing with a problem: My pawn starts significantly drifting to right or left (depending on the direction of the rotation) if the rotation speed is too high (For instance, above 15 degrees per second), plus, the drift gets higher and higher if the rotation speed gets higher too, until you can’t even move or start moving in circles. This does not happen if the rotation speed is low enough, or non-rotating. If it’s not rotating or the platform is rotating very slow, my pawn will of course travel perfectly in a straight line. I have tried multiple ways for making the pawn travel in straight lines without drifting from its direction, but they made it worse and didn’t even work at all. I ended up just leaving the initial pawn movement code I had, since it works the best.


Here’s a video of the problem: Dropbox - Unreal Engine 5 2023.11.21 - 19.36.12.02.mp4 - Simplify your life
In the video, a slight drift to the left is observed, if the platform rotates at 180 degrees per second.

I’d say don’t attach your pawn to the platform.

Just use the pawn normally on the platform. Normal pawn movement code will move relative to it anyway.

1 Like

I’d do that, but the thing is, I am using a flying pawn (pretty much just a capsule and a camera with a FloatingPawnMovement, and I coded it so that it can freely fly, like a freecam). This pawn will not automatically move or rotate with objects if I collide with them, therefore I need to attach the pawn to the rotating object.

1 Like

Meh… you’re spending your whole time fighting the attachment. It’s not really ever going to do what you want, I suspect.

If you really want to have flying and then platform friction, it might be better to use a character blueprint, and switch the gravity off and on.

Is you pawn a ACharacter using the UCharacterMovementComponent?
I ask as the character has this idea of a MovementBase and automatically handles moving the character based no how the base moves and rotates (the thing they’re standing on).
It should just work out of the box and you shouldn’t have to do any attaching to platform.
I don’t believe APawn handles this out of the box.

I tried the same method using a Character instead of a Pawn, to see if hopefully anything happened. However, the same thing happened. I guess this happens only because my pawn flies and doesn’t walk (Main feature is a flying pawn, obviously). I use the attaching method for that same reason: The pawn/character cannot rotate or move with an object if it’s not walking or whatever, so attaching was the only solution. Attaching works very good for the thing I am trying to make, however this is the only problem that arises.

Character Movement Component (CMC) fully supports Flying.


If your character walks on a surface that’s moving you can enable “Ignore Base Rotation”.

image

I know, I stated in one of my replies that I tried to achieve the same thing but using a flying Character instead of a Pawn. The results were the same as if I used a pawn if I attached it to the platform. I guess the problem is attaching the pawn/character to the platform. Thing is, I have no idea how I will even make the pawn or character rotate and move with an object while the pawn/character is flying (not walking, no gravity or experiencing friction in any way, just basic collision), without doing any kind of attaching to the object.