Rotating platfomer - stationary Background

0 favourites
  • 7 posts
From the Asset Store
*** 2D top down animated rotating trap game asset ***
  • 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?

    .capx

    (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" />

    makotto

    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">

    http://games.theoriastudio.com/ballgamedemo/index.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • : Thanks for fixing the url!!!

  • 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)