How do I make a bouncing player?

Get help using Construct 2

Post » Mon Nov 10, 2014 11:30 pm

I have a player sprite with a CustomMovement behaviour and i want to achieve for it something like the "bounce off solids" property of the bullet behaviour. I have tried with some CustomMovement reverse options and I've done something that only works when the player is bouncing against some prefect formed sprite, but this is not working with a sprite that have a strange formed collision polygon:

Image

I hope I've explained myself clear enough.

Could somebody help me with this?

Thank you.
B
12
S
2
G
1
Posts: 32
Reputation: 756

Post » Tue Nov 11, 2014 3:32 am

Have you considered changing the collision polygons so they will be more conducive to the desired effect. Is there some reason you can't? It's a little hard to tell without seeing the game.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Tue Nov 11, 2014 9:15 am

The problem is that I want to bounce in different angle and speed depending on how the player hit the sprite.

I uploaded the capx. What I want is to get a more "natural" bounce when I hit the green sprite (I haven't even got this with the black squares).

Thanks for answering.
You do not have the required permissions to view the files attached to this post.
B
12
S
2
G
1
Posts: 32
Reputation: 756

Post » Sat Nov 15, 2014 10:46 am

I've found a solution.

For my player movement I'm gonna use the Physics behaviour instead of Custom movement. With this, construct2 will gonna handle the bounces automatically.
B
12
S
2
G
1
Posts: 32
Reputation: 756


Return to How do I....?

Who is online

Users browsing this forum: gskunk, tarek2 and 45 guests