How do i rotate the screen off center ?

Get help using Construct 2

Post » Tue Feb 21, 2012 12:21 pm

Hi guys, i have a problem that keeps me pinned ,
i want to rotate the layer or layout and i put these events

System <Every tick >> Set layout angle = layout.angle + 1

This does it job fine at what its doing however i dont wont the center of rotation to be the middle of the layout , i want it to be the bottom so that i can put a sun and a moon for example and make them appear from the botton of the screen , pass all the way through the sky and then hide again in the bottom

like this
x = center of layout rotation
________________


        x


________________


________________





_______x________

how do i do that ? thx
the marked one2012-02-21 12:21:54
B
10
S
2
G
3
Posts: 77
Reputation: 2,934

Post » Tue Feb 21, 2012 12:25 pm

Unfortunettly it's not possible to set rotations center at the moment.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Tue Feb 21, 2012 12:29 pm

i can't be , my whole game depends on that , there must be a way to rotate something off center
B
10
S
2
G
3
Posts: 77
Reputation: 2,934

Post » Tue Feb 21, 2012 12:41 pm

ok i think i got it, what if i pin the object that i want to rotate to an object on the layout that is invisible and put a vertical distance between them as much as the layout.height that should mirror the movement but on another position ..,,, wait im going to try it the marked one2012-02-21 12:42:17
B
10
S
2
G
3
Posts: 77
Reputation: 2,934

Post » Tue Feb 21, 2012 12:59 pm

The layer/layout rotate around scrollX, scrollY.
Those values are the center of your window.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Tue Feb 21, 2012 1:03 pm

how do i change these ? i cant find them in the event editor...
B
10
S
2
G
3
Posts: 77
Reputation: 2,934

Post » Tue Feb 21, 2012 1:09 pm

oh i see ,ok got it i just made the center of x and y an object putt scroll into it and moved everything at the center of the layout and it worked , thanks !!
B
10
S
2
G
3
Posts: 77
Reputation: 2,934

Post » Tue Feb 21, 2012 1:15 pm

no wait..... i didn't when you rotate the layout it rotates around the center of the layout but when you rotate the layer it rotates around the center of scrolling however i cant make it scroll off center because the center of the screen is always going to be the scroll x and scroll y.....
B
10
S
2
G
3
Posts: 77
Reputation: 2,934

Post » Tue Feb 21, 2012 1:25 pm

ok i finally found it !!
How to make an object move circular or elliptical around a center :
place the object at the center of the movement
add to it 2 sine behaviors
change the settings of one to horizontal and the other to vertical
change at both the magnitute to the same value if you want circular movement or change the ratios between them for elliptical ,
now chage the horizontal's or vertical's sine period offset at the 1/4 of the period.....voila ! should i post it as a tutorial in the section cause i find it quite usefull ?

the marked one2012-02-21 15:13:44
B
10
S
2
G
3
Posts: 77
Reputation: 2,934

Post » Tue Feb 21, 2012 2:25 pm

Are you talking about this:
[quote]Make an object rotate around another via events - LINK[/quote]
or this :
[quote]Rotate a layer and still interact with its physical objects as they appear on screen - LINK[/quote]
?
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Next

Return to How do I....?

Who is online

Users browsing this forum: ManuelPerez, Yahoo [Bot] and 22 guests