Attach Character to Another Actor, Rotate Actor Gives Strange Results

I’m trying to create a game where there are many boards that the player can rotate. When the player rotates a board, I want everything on the board to rotate as well, including the character.

Right now I’m attaching as a child component to any board he move onto, mostly as a way to keep the player from jump teleporting (jump, press rotate, end up somewhere else on the board).

I run into a problem when rotating. The rest of the board rotates just fine, but my character (based on third person character, modified to be top down) rotates strangely. When I’m in the editor and rotate the board 90’, it rotates correctly; however if I programmatically rotate 90’ (Board → AddActorWorldRotation, or SetRotation, or many other methods I’ve tried), the character gets unaligned.

I suspect somehow this has to do with character class itself, or the movement component.

When the character is NOT a child to the board, it works fine, except that when you jump and move the board it’s basically teleportation, which is what I’m trying to avoid.

Here is changing the parent rotation manually in the editor to 90.

Here I change it in blueprint.

Here I tested putting 2 characters next to each other, then setting rotation in blueprint. It seems that one character blocked the other from moving in that strange manner, but they both still rotated incorrectly. It looks as if though they got a move command when rotating the board, as they are both facing a new direction.

What am I missing here?

1 Like

I have confirmed that it is the character movement component. When i turn off the components tick, the issue goes away, but when I turn it back on (after the rotate), the character teleports to the incorrect location.
Still not quite sure where in the movement component this is happening.

1 Like

For now I’ve solved this by setting movement on the movement component to NONE, rotating, then setting it back to walking after. This is a bit hacky and doesn’t work quite as I want obviously (as I’d like to not actually affect the character), but it lets me move on for now. If anyone gets an answer for this eventually I’d appreciate it!

1 Like