Rotating platfomer - stationary Background

Get help using Construct 2

Post » Sat Nov 09, 2013 10:04 am

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)cvp2013-11-09 10:07:51
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Sat Nov 09, 2013 10:17 am

Set the background layer to parallax 0,0 and replace the system set layout angle action with sytem set layer angle.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Nov 09, 2013 3:17 pm

@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.
B
28
S
10
G
10
Posts: 97
Reputation: 6,584

Post » Sat Nov 09, 2013 8:42 pm

@LittleStain

Thx m8. that worked like a charm

@Makotto
I am getting a 404 on your link. Got it working from littleStains suggestion, but thx for the interest in helping out.cvp2013-11-09 20:49:48
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Sun Nov 10, 2013 12:44 am

@cvp - there was a space in the url.



http://games.theoriastudio.com/ballgamedemo/index.html
Image
B
27
S
9
G
5
Posts: 488
Reputation: 11,948

Post » Sun Nov 10, 2013 5:08 am

@JohnySix : Thanks for fixing the url!!!
B
28
S
10
G
10
Posts: 97
Reputation: 6,584

Post » Sun Nov 10, 2013 6:47 pm

@JohnnySix
There are sadly a lot of 404's to peoples dropboxes etc on this forum
so didnt even check the link
B
20
S
6
G
4
Posts: 347
Reputation: 4,451


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests