How do I rotate layer around a specific coordinate in layout

0 favourites
  • 6 posts
From the Asset Store
Simple resize and rotate events for any sprite, quick and easy event sheet that you can use for your own projects.
  • Any way to rotate a layer around a coordinate in a layout? Seems like rotating a layer always rotates it around the center of the screen, which is lame.

  • A layer, no.

    A bunch of objects?

    objects initial x+cos(anglelerp(0,youreverincreasingangle,youRotationspeed*dt))*distance

    objects initial Y+sin(anglelerp(0,youreverincreasingangle,youRotationspeed*dt))*distance

  • Maybe scroll to the point you want to rotate from, rotate, then scroll back. It may not work if the engine waits till the next frame to apply it. I haven't tried it though. Worst case you'd just not use the layer rotaion feature and rotate like newt suggests.

    More general control for layers would be welcome. Instead of the parallax controls I wish layers could be moved, rotated from any point, scaled from any point X and y, and why not, skewed from any point. All those are affine transformations and it would make you and I happy to have.

  • newt, That wouldn't work for tilemaps.

    r0j0hound, just tried your suggestion, but it didn't work. I added a wait 1sec after rotating and repositioned scrollto, and it just rotates around wherever the center of viewport is.

    More control over layers, etc would be great- I want all of those too.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well you can't rotate tilemaps anyway, at least not, and still do collisions.

  • they ought to fix that too.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)