How do I make my player slide on other solids?

Get help using Construct 2

Post » Fri Dec 12, 2014 12:07 am

Hello,
I´m making a platform game but I dont know if there is a way to avoid that my player get stuck on every corner when it is on collision with the platforms :( . I want that my player slides on other solids and not get stuck on the solids... any help? thanks! :)
You do not have the required permissions to view the files attached to this post.
Last edited by Lexball03 on Fri Dec 12, 2014 1:31 am, edited 1 time in total.
B
7
S
1
Posts: 28
Reputation: 652

Post » Fri Dec 12, 2014 12:22 am

what do you use for your movement? 8dir? custom? have you tried decelerating on collision instead of instant speed stop?
there's a million of possibilities, but you haven't really told us much what do you have / have done. upload your capx.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
42
S
14
G
12
Posts: 624
Reputation: 9,421

Post » Fri Dec 12, 2014 12:32 am

Why not to use one invisible solid sprite and set other platform skins above it.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Fri Dec 12, 2014 1:20 am

@saiyadjin @A0Nasser thanks for the answers. The player is using platform and solid behavior and the platforms are using solid behaviors. I´ll try what you say. Thanks! :)
B
7
S
1
Posts: 28
Reputation: 652

Post » Fri Dec 12, 2014 1:31 am

Here is de capx. If you tried to jump to the platform andthe player collision with de edge, he get stuck on his hed, arm... I want to avoid this. It is that possible? @saiyadjin
You do not have the required permissions to view the files attached to this post.
B
7
S
1
Posts: 28
Reputation: 652

Post » Fri Dec 12, 2014 3:44 am

This is what cause the problem you are facing:
Image

Yes the guessing polygon need to be fix like this:
Image
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Fri Dec 12, 2014 10:25 am

there, alextro gave you a solution. When you're checking for collision it uses these poligons (polygon from your character vs polygon of your object of collision) to check if they have touched. if you use the one from upper picture, you can see it's polygon is not really as character is. so best to do to avoid simple mistakes is to use bounding box as shown on picture 2. later you can change that for better approximation around your char, but you have to do then pixel perfect collisions and more.

best you can do to try for now - use bounding box both on your player, and your object of collision - yes they both need to have good collision polygons for it to work nicely.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
42
S
14
G
12
Posts: 624
Reputation: 9,421


Return to How do I....?

Who is online

Users browsing this forum: AndreasR, David181, karthikavnair and 8 guests