Bounce effect.

Get help using Construct 2

Post » Sat Jan 04, 2014 4:49 pm

Hello there,

How can i make a falling sprite bounce like a rubber ball when it hits a solid?
This sprite will be the player.
B
8
S
1
Posts: 13
Reputation: 1,072

Post » Sat Jan 04, 2014 5:12 pm

Hi @Deivide,

My answer probably won't be as helpful as I'm new to C2 as well but AFAIK if you use bullet behavior, there's a bounce option or probably better if you assign physic behavior to the player instead.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Sat Jan 04, 2014 5:20 pm

Hmm i'll look at Bullet Behavior, thanks.

If anyoneelse got another way, please tell me.
B
8
S
1
Posts: 13
Reputation: 1,072

Post » Sun Jan 05, 2014 2:25 pm

Add physics to your object, on collition with the solid, accelerate object or change velocity in the other direction play a bit with the values in order to gain the desired effect.

Give us some more details so we can come up with a better solution.wildmedia2014-01-05 14:26:42
B
15
S
3
G
2
Posts: 42
Reputation: 2,412

Post » Sun Jan 05, 2014 7:53 pm

Let me test the physics, i'll give feedback whenever i can
B
8
S
1
Posts: 13
Reputation: 1,072

Post » Mon Jan 06, 2014 3:28 pm

Physics on both objects.
- Set a number close to 1 on the Elasticity of the solid.
- Set Immovable.

Or

Bullet Behavior on the "ball"
- Bounce off solids - YES.
B
12
S
1
Posts: 46
Reputation: 1,853

Post » Mon Jan 06, 2014 3:43 pm

Can physics be applied to a player controlled object? If so you might need to also disable control on the player while they are bouncing or you might get strange effects.

If you cant add physics to a player object, then simply swap out a single sprite copy of the player for the physics bouncing part, then swap back in the player controlled version of the sprite after he stops moving.

B
90
S
44
G
17
Posts: 1,012
Reputation: 18,527

Post » Tue Jan 07, 2014 1:57 am

I gotta study a little more, physics helped but made the player shake on every solid, i had to make Ifs and Elses to push the player from the solid.
Like i said, gotta study a bit more to apply the wanted force
B
8
S
1
Posts: 13
Reputation: 1,072

Post » Tue Jan 07, 2014 1:59 am

Keep the friction low and the elasticity high and it'll be bouncing around like a basketball : D
B
47
S
18
G
84
Posts: 2,273
Reputation: 49,800


Return to How do I....?

Who is online

Users browsing this forum: MadSpy, Seruza, Yahoo [Bot] and 32 guests