How do I make a platform bounce on landing?

Get help using Construct 2

Post » Thu Apr 21, 2016 12:47 am

Is there a simple way to make a 'platform' (a sprite) bounce when the character lands on it?
I am currently using the platform behaviour for my character and solid for the 'platforms'
I want the platforms to bounce down then back up when landed on
Do I need to apply physics for this?
B
7
S
1
Posts: 18
Reputation: 423

Post » Thu Apr 21, 2016 2:21 am

Yes apply physics to the platform sprite.

You can set it so

every tick > apply impulse towards position (This will Keep the Platform in position)

Then

Player Sprite on collision with Platform Sprite > Apply Force towards highest Y value (The Lowest point in the layout)

Make sure you set the world gravity for the platform object to 0 on start of layout. Also, when working with physics, make sure all animation frames have the same collision polygon. if the collisions are constantly changing it will go nuts.

You could create an effect similar just by moving the platform up and down on collision with player, but with physics it looks way better.
B
9
S
3
Posts: 104
Reputation: 1,033

Post » Thu Apr 21, 2016 3:05 am

Thanks Frostein
Just what I was looking for ;)
B
7
S
1
Posts: 18
Reputation: 423


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests