Climbing up mild slopes (45° or less)

Get help using Construct 2

Post » Tue Aug 28, 2012 4:16 am

My playable character is getting stuck on some pretty mild climbs. Everything I've seen asked before on these forums has been about sliding down steep ones; I just want to climb up without snagging.

It's inconsistent and you might need to walk over the slope several times before it will glitch up, but I've had it happen even on the really gentle slopes that only climb one pixel for every two horizontal ones. (I can't seem to reproduce the bug on those ones right now, though...)

I'm using an invisible collision box with the platform behavior, so it shouldn't be a result of the animated sprite snagging on things.

It might be because I'm drawing my own slopes instead of rotating flat sprites, but I need to be able to do that. Essentially, is there a simple way to adjust how high a climb has to be before my character is unable to easily power over it?

The game: http://ownicon.com/feat/

If a capx file is necessary, I guess this "backup" one should be okay?: http://dl.dropbox.com/u/5962178/Ownicon%20Feat-287i63lyx5doi.capx
B
9
S
2
G
1
Posts: 10
Reputation: 1,357

Post » Tue Aug 28, 2012 7:17 am

Have you taken a look at the collision polygons for your slopes? Some of them are a bit wonky.

Just in case you don't know what I'm talking about: when you upload a sprite, Construct tries to best guess the shape of the object to serve as it's "collision polygon", the shape that will be used when calculating collisions. You can see and edit the polygons yourself by going to the animation panel and clicking the bottom icon on the left that says "Set collision polygon".

Anywho, Construct isn't perfect -- sometimes its best guess comes out pretty strangely, which is the case here. Your straight inclines have some jagged edges in a few spots that your character can get caught on. Just make sure that you fix them up and you should be good to go!
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Tue Aug 28, 2012 8:24 am

That seems to have done the trick! I had no idea that Construct used those collision polygons for everything, nor did I know that it would automatically try to draw them. It makes sense. I'm amazed that the fix was so easy.

Thanks so much.
B
9
S
2
G
1
Posts: 10
Reputation: 1,357

Post » Tue Aug 28, 2012 8:49 am

A similar thing happened to me before :)

Sometimes even with the polygon set up, you can still get strange behaviour, if it happens, just let C2 re-guess and adjust from there.
B
22
S
7
G
3
Posts: 189
Reputation: 4,270

Post » Tue Aug 28, 2012 6:54 pm

I'll keep that in mind, thank you.
B
9
S
2
G
1
Posts: 10
Reputation: 1,357


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 0 guests