Breaking An Object

Get help using Construct 2

Post » Wed Dec 04, 2013 9:39 am

Hey!

I need help with pieces of a brick flying off in their own direction.

I was using particles but I had to switch to sprites because I want to use collisions. As of right now my four sprites break off and go in their own direction, which is good, but I can't seem to set the gravity of these sprites.

Anyone able to help?
Thanks!Tekniko2013-12-04 09:39:24
B
56
S
15
G
13
Posts: 826
Reputation: 17,705

Post » Wed Dec 04, 2013 9:56 am

It would help to know what behaviour you are using and how you have your events set up.

I'll just guess you are using physics because you talk about gravity (could also be bullet behaviour or others)

If you are using physics you can't set gravity per object, just the world gravity in general. You could change the density of the objects to make them react differently to the gravity. also changing the collision polygon has effect on how the pieces react, for it determines where the objects gravity-point is.LittleStain2013-12-04 09:57:09
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 » Thu Dec 05, 2013 12:13 am



This is what I am working with. I just need to give the pieces a burst of energy upwards and then let them fall on their own.

If this gets too complicated I will just switch back to using a particle system and just forget adding collisions.
B
56
S
15
G
13
Posts: 826
Reputation: 17,705

Post » Thu Dec 05, 2013 1:00 am

Just switch physics on under each created sprite. megatronx2013-12-05 01:05:11
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
93
S
30
G
22
Posts: 1,987
Reputation: 20,203

Post » Thu Dec 05, 2013 4:06 am

Yea, the physics are on and the brick pieces fall down. They just don't have that "pop-up" effect. Here is a link below that has the effect I am trying to go for. Watch as the Leprechaun jumps up to break the blocks.

http://www.youtube.com/watch?v=2HQDbb17A1M
B
56
S
15
G
13
Posts: 826
Reputation: 17,705

Post » Thu Dec 05, 2013 5:20 am

My best bet would be to use the physics apply force at angle action to achieve this. You can apply force at a specific angle for each of the bricks that you create to give them that popping feeling.

You'll need to play around with the force amount, object's density and the world gravity value to get it all looking nice and smooth.
B
19
S
6
G
2
Posts: 57
Reputation: 2,534


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests