A flattened rotating disk?

Get help using Construct 2

Post » Wed Jan 28, 2015 12:32 pm

Is it possible to make a rotating round object, but with a "flattening" effect?
Something like a vinyl record viewed from a normal perspective. (not from the top)

Just a reduced object height, along with the rotating behavior attached to it.

Any Ideas?
Image ImageImage
B
55
S
25
G
9
Posts: 177
Reputation: 8,782

Post » Wed Jan 28, 2015 2:27 pm

You could create a Top Down-Sprite of the vinyl record wich has a turning animation and then afterwards you play the animation and reduce the height of the sprite until it fits your requirements?
B
3
Posts: 6
Reputation: 187

Post » Wed Jan 28, 2015 3:47 pm

You mean having rotation in the animation editor, not using the 'behaviors' function?
Yes, I guess that's another way to do it. But that isn't the best way to do.

If I want a very slow & smooth rotation, that means I need to prepare a vast number of sprites on every changing angle... This is not the process I really want to go through. (what if I have hundreds of them) :?

I was hoping for a more simple, elegant solution. I might not really need this effect in the end, i'm just asking if it's possible with some settings, or maybe using plugins...

Thanks anyway for this idea, RibsGrowBack. :)
Image ImageImage
B
55
S
25
G
9
Posts: 177
Reputation: 8,782

Post » Wed Jan 28, 2015 3:56 pm

The moment you said it I though - rotate behaviour + some scaling shader - then realized that in most usual cases the shader would rotate with the sprite. How big is this meant to be? Could it work as a layer that you can squash? I might be able to cook something up...
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Wed Jan 28, 2015 6:22 pm

I don't understand, Somebody. What's scaling shader? is it another kind of plugin than the usual scaling method?

Anyways, I thought about this through and I think this is a no-go for me.
Flattening a circle object will not make it look more 3d-perspective-like, right?! :roll:

I'm ditching this idea, unless there are plugins that could do 3d perspective looks, and the rotating effect I want.

Thank you for your time, guys!
Image ImageImage
B
55
S
25
G
9
Posts: 177
Reputation: 8,782

Post » Wed Jan 28, 2015 9:04 pm

Don't give up so soon! A Shader is a graphical effect that works on sprites/or layers after they are drawn on screen so if... Somebody... were to make a Shader that scales and image you could animate things on a layer and the shader would kinda squeeze them down to look like they have some depth. Maybe like this?

Image

The downside is not too many mobile systems support shaders (yet) and it could eat some performance - but if this is a showcase effect like in my demo you should be good to go.

If you'd like to try it out just go to my Shader folder here: https://www.dropbox.com/sh/vmvnuiiis0fr ... _Gd7a?dl=0

Download the Scale.c2addon file and drag it into an open C2 window - it will install. Then you can download the Scale.capx file and check out how the demo in the gif above was made. It is a good idea to place all the things on the scaled layer first and then activate the effect - also it will look weird in the editor, but correct at runtime.

Note: For some reason the way Shaders works is from the bottom left to top right - so when you scale something down it will move towards bottom left. Also - try not to place objects outside the layer to scale (or it will look weird). Experiment and have fun.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Wed Jan 28, 2015 11:56 pm

Alternative version without shaders -- it does, however, use R0j0hound's Canvas plugin. This method is similar to how it would be done using a separate render target in another framework, such as MonoGame. It's not as elegant as the shader solution, but it gets the job done if shaders aren't an option.
You do not have the required permissions to view the files attached to this post.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,106

Post » Thu Jan 29, 2015 1:06 am

Ah, those are NEAT! Looks just like the effect I initially wanted!

Thank you so much Somebody & Linkman2004, appreciate your efforts!
Image ImageImage
B
55
S
25
G
9
Posts: 177
Reputation: 8,782

Post » Thu Jan 29, 2015 7:02 am

linkman2004 wrote:It's not as elegant as the shader solution, but it gets the job done if shaders aren't an option.

My solution got called elegant by linkman? :shock: Sounds like have come full circle when it comes to scale (thanks again for that awesome CC behaviour, btw).

Allen T wrote:Ah, those are NEAT! Looks just like the effect I initially wanted!

Thank you so much Somebody & Linkman2004, appreciate your efforts!

You are welcome! Pick whichever works best, mine is probably the lazier option, while the other gives you more control over positioning and so on.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646


Return to How do I....?

Who is online

Users browsing this forum: Alvaro2 and 14 guests