Cut (or Slice) an Object...

Get help using Construct 2

Post » Fri Aug 31, 2012 10:31 pm

Hi there,

do somebody know how we can slice a object in pieces (maybe with an laser or something else).

Hopefully we can do this with C2.

It will be perfect when somebody have an *.capx Example...

Thanks

KMag
B
13
S
4
G
3
Posts: 120
Reputation: 3,456

Post » Fri Aug 31, 2012 10:51 pm

Not possible, unless @R0J0hound knows some magic with the canvas plugin.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Aug 31, 2012 11:01 pm

For a quick work around - maybe you could use pre-sliced objects? Two halves of same sprite pined together. But it all depends what you are trying to do and what complexity of slices you want.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sat Sep 01, 2012 12:10 am

[QUOTE=sqiddster] Not possible, unless @R0J0hound knows some magic with the canvas plugin.[/QUOTE]

Nothing is impossible...

http://www.scirra.com/construct2/demos/cant-turn-it-off
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,192
Reputation: 18,301

Post » Sat Sep 01, 2012 12:17 am

It's a nice example, but it's not "real" slicing or anything close to it.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sat Sep 01, 2012 12:19 am

I saw a game before, made with C2, a spaceship cutting the earth to go ahead, but didn't found it anywhere. It was 1 year ago.
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,192
Reputation: 18,301

Post » Sat Sep 01, 2012 12:41 am

Oh it's possible alright.

You'd need to have two copies of the sprite and then make use of the blend modes (check out the example capx for that) to make part of one sprite invisible and the corresponding part of the other sprite invisible. It gets trickier if you want to make the cut at an angle or off-center, but definitely doable.

I can't make an example right now because I'm on my phone, but let me know if you need one later on.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Sat Sep 01, 2012 10:08 am

@SullyTheStrange

A little example will be perfect!

Thanks

KMag
B
13
S
4
G
3
Posts: 120
Reputation: 3,456

Post » Sat Sep 01, 2012 11:54 am

http://dl.dropbox.com/u/19702035/cuttest.capx

Here's a commented example showing it off. Unfortunately, making the cut at an angle (probably) takes some math which is just too extreme for me to be doing at 6 in the morning.

Edit: I actually just thought of a simpler way that cuts out all the math! But now I'm passing out on the couch, so gimme a few hours and then I'll do itSullyTheStrange2012-09-01 12:44:50
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Sep 05, 2012 7:45 pm

[QUOTE=SullyTheStrange] http://dl.dropbox.com/u/19702035/cuttest.capx

Here's a commented example showing it off. Unfortunately, making the cut at an angle (probably) takes some math which is just too extreme for me to be doing at 6 in the morning.

Edit: I actually just thought of a simpler way that cuts out all the math! But now I'm passing out on the couch, so gimme a few hours and then I'll do it[/QUOTE]

Nice example ^^

Looking forward to see the complete sample file!
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,192
Reputation: 18,301

Next

Return to How do I....?

Who is online

Users browsing this forum: dewetberg, Yura G and 33 guests