How do I fix the layer angle?

1 favourites
  • 7 posts
  • Im having a big problem, i have a game that is a small space sandbox game, that means that there is no up and down and when it's close to a planet the layout angle changes to match the one of the planet the player gets close to

    The problem is that when the layout rotates the layers doesn't, and this is a big problem with the HUD layer, when the layout spins the layer keeps track of the player position but doesn't spins as well, i tried setting so every tick the layer angle changes to the one of the layout but it didn't worked, i don't really know what to do at this point and if i have to send a project to someone to help me then i will, any help would be pretty much appreciated and i will respond as quickly as i can

  • Do you need to rotate the whole layout? Why not just change the angles of the layers that need to be rotated?

  • I kinda need to since it's a space game, i need the perspective to rotate according to where you are so it was necessary

  • I tried making a quick example file to see if I could recreate your problem. I think, if I understand correctly, you just need to set the HUD layer angle like this:

    -> System: Set layer "HUD" angle to LayoutAngle×-1 degrees

    Here is a copy of my example file: dropbox.com/s/qm31mw43zl45b92/angle_test.c3p

    Does this help?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Actually yeah that helps a lot!

    But i don't understand why adding the *-1 Solved the issue

  • Changing the layout angle automatically changes the angle of every layer. Buy you can also rotate the layer angles as well. So if you want one of the layers to not rotate you have to offset that layer's angle by opposite of the layout angle.

    So for example, if the layout has rotated 30 degrees you want to set your HUD angle -30 degree to get it back to 0.

  • Thanks man for real, you have no idea how much you helped me

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