Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Can't rotate player

One of my levels is drawn in Dutch angle style and I want to rotate the player for some degrees too. I want all my Player's animations (Idle, Walking, Playing the invisible guitar, etc) to be the same, just to be rotated at some angle. But looks like I'm doing something wrong.

Without Moveable component Player isn't rotating, so I've added it to the root prefab object with Player Component (adding Moveable to sprite child object doesn't help). With Moveable component Player is rotating endlessly =).

I found out that's because "Turn root object in 3D" check is unchecked. But if I set it checked, then I get no rotation at all!

And I want him to be rotated like this (at every animation):

I've removed almost all the other components, like Box Collider 2D, Rigidbody 2D, tried to check/uncheck both flags in the action "Object -> Transform", and so on, but no luck.

Could you please help me?

Comments

  • I don't suppose it's possible to just rotate the camera instead?

    If you need to affect the Player, you'll need to leave the root object alone, since AC needs control over the root Transform values. You'll also need to keep "Turn root object in 3D?" unchecked.

    If the rotation should last for the whole scene, though, it's easiest to just rely on a dedicated Player object just for this scene.

    Assuming you've set your Player prefab in the Settings Manager so that it gets spawned in, drop a copy of the prefab into the scene. This will then override your regular prefab for the duration of the scene.

    With this local Player character, change the sprite child's Z rotation to 30 while in Edit mode. So long as your animations don't affect the rotation property, it should stay that way at runtime.

  • Thank you very much, Chris! I've added Player's Prefab on the Scene, rotated it, and it worked like a charm! Thank you!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.