Forum rules - please read before posting.

Hmm...how is Copy Rotation supposed to work in 2D?

Hi, I'm back again. Thank you for all the answers; AC has the best support I've seen in years!

So when I try to teleport an object to a marker in a 2D game, there is an option to copy rotation. However, as the marker's rotation is changed during gameplay, I always wonder what's the correct way to approach this.

Say I set the marker's rotation as (0, 0, 120), which also happens to be the rotation I want for the object. However, the marker's rotation is automatically changed to (0, -120, 0) when I press play; as a result, when the object is teleported there, its rotation is completely off.

I assume the markers' rotations are changed so objects don't get rotated along the wrong axis in a 2D game, but in this case that's exactly what happened. So how should I make use of the copy rotation function? What's the right way to set these markers up? Thank you!




Comments

  • edited June 2017
    You're welcome, @Lavennin.

    Markers are rotated at runtime because 2D characters and objects still rotate around the Y-axis - Marker's rotation around the Z-axis during Edit mode is for convenience, allowing you to work in the Scene window's 2D view.  The rotation occurs automatically when the game begins to convert the "visual" rotation into the "true" rotation.

    Character sprites are face the camera at all times by having their sprites counter-rotate opposite to their root objects - meaning you should be fine to have characters copy the rotation of Markers.  However, if you have any other object copying a Marker, then that object will have the Marker's "true" rotation at runtime.

    What kind of object are you teleporting?  You could alternatively set the teleported object's rotation explicitly by using the Object: Transform Action instead.
  • Thank you, that explains everything.

    It was just a simple sprite, and I was being lazy, trying to teleport and rotate through just one action. :D

    I'll just use transform then.
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.