Rotating platfomer - stationary Background

0 favourites
  • 7 posts
From the Asset Store
40 ambient sound loops. A wide selection of looping ambient sounds for different locations.
  • Hi

    Looking at the rotary example which comes with C2.

    how would you go about it if you wanted the background (in this case the tiledbackground of scirra logos) to be static?

    So I still want the platform to rotate like it does, but i want the background to be static.

    Any suggestions?


    (i have moved the background to a separate layer, as i would like the layer to be static, both for the background but also for a potential HUD layer later on)

  • Set the background layer to parallax 0,0 and replace the system set layout angle action with sytem set layer angle.

  • cvp

    I know this is not perfect example, but are you looking for something like this? (Blue arrows background)

    [Left/Right arrow to rotate, A/Q for zoom out/in, Z for scale back to normal]

    In the rotating background example, the character changes its center of gravity every tick and the window follows him.

    To address your issue, create a layer only for the background (called BKG_LAYER for example), and add:

    every tick -> Set BKG_LAYER angle to player.angle

    This will make the background static using the player as reference.

  • LittleStain

    Thx m8. that worked like a charm <img src="smileys/smiley32.gif" border="0" align="middle" /> <img src="smileys/smiley32.gif" border="0" align="middle" />


    I am getting a 404 on your link. Got it working from littleStains suggestion, but thx for the interest in helping out.

  • cvp - there was a space in the url. <img src="smileys/smiley12.gif" border="0" align="middle">

  • : Thanks for fixing the url!!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • JohnnySix

    There are sadly a lot of 404's to peoples dropboxes etc on this forum <img src="smileys/smiley24.gif" border="0" align="middle" />

    so didnt even check the link <img src="smileys/smiley17.gif" border="0" align="middle" />

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