How do I make a galaxy-type rotation?

Get help using Construct 2

Post » Tue Jan 12, 2016 2:41 pm

Hi

I'm trying to achieve an effect similar to this: http://3.bp.blogspot.com/-Y7czorI81zs/U ... hd1080.gif

As in having an image rotating while maintaining its ellipse. It's an easy effect to accomplish in flash: https://dl.dropboxusercontent.com/s/yil ... ?dl=0-raw1

Is there a way to do it in Construct? Scaling it somehow, or adding a distortion to the view?
B
9
S
3
Posts: 59
Reputation: 743

Post » Tue Jan 12, 2016 4:04 pm

Yeah Sin behavior, and Rotate behavior.
Play with the settings a bit.
Add an additional Sin for the z axis.
https://dl.dropboxusercontent.com/u/666 ... inkle.capx
Last edited by newt on Tue Jan 12, 2016 11:24 pm, edited 1 time in total.
Image ImageImage
B
165
S
49
G
147
Posts: 8,048
Reputation: 96,588

Post » Tue Jan 12, 2016 6:20 pm

This won't quite cut it. The stretching needs to occur on the rotated image, which I believe is impossible to do in vanilla C2. One way to do it would be to use a paster object (plugin by R0J0hound).

Here, I put the galaxy sprite in a container with a paster. Every frame I refresh the paster sprite by first re-positioning and expanding the drawable area back to the original state, paste the galaxy with a newly rotated state, and then stretch the paster object by an arbitrary factor (< 1 to retract, >1 to expand). Then I position the paster in a manner that it seems to share the sprite origin. Seems to work pretty well !
B
60
S
24
G
23
Posts: 934
Reputation: 17,528

Post » Tue Jan 12, 2016 10:44 pm

Awesome, thanks a bunch, both of you! The paster version worked perfectly!
Last edited by Xeeko on Wed Jan 13, 2016 7:29 am, edited 1 time in total.
B
9
S
3
Posts: 59
Reputation: 743

Post » Tue Jan 12, 2016 11:24 pm

Image ImageImage
B
165
S
49
G
147
Posts: 8,048
Reputation: 96,588

Post » Tue Jan 12, 2016 11:43 pm

Nice addition ! :D
B
60
S
24
G
23
Posts: 934
Reputation: 17,528

Post » Tue Jan 12, 2016 11:59 pm

Thanks.
The Paster solution was spot on too.
Just need a tilt shift heightmap kind of effect to get it like the gif.

Also @Xeeko WII devs have fight club rules so be careful there.
Image ImageImage
B
165
S
49
G
147
Posts: 8,048
Reputation: 96,588

Post » Wed Jan 13, 2016 2:07 am

B
60
S
24
G
23
Posts: 934
Reputation: 17,528

Post » Wed Jan 13, 2016 7:27 am

@newt what do you mean?
B
9
S
3
Posts: 59
Reputation: 743

Post » Wed Jan 13, 2016 3:30 pm

Wii devs have to sign a nda saying they won't talk about just about anything.
If you are planning on going that route.

Those last two capx may be out of that hardware range. heh
Image ImageImage
B
165
S
49
G
147
Posts: 8,048
Reputation: 96,588

Next

Return to How do I....?

Who is online

Users browsing this forum: pokka and 5 guests