Slippery platform collisions

Get help using Construct 2

Post » Tue May 07, 2013 2:23 am

Hi,
I'm quite new to Construct 2, but unless I'm missing something (which it could well be!) it seems that the platform behaviour doesn't feature slippery slopes:

PlatformTest.capx

...and it is quite a bummer if your game isn't based on perfectly squared platforms, something which I tend to avoid with my visual styles.

Any suggestions on what is the most efficient way to have the player slide on certain surfaces depending on the angle, instead of having it steadily climb even on the tiniest pixel?

Cheers,
ele
B
10
S
1
G
1
Posts: 13
Reputation: 1,111

Post » Tue May 07, 2013 2:33 am

Hello @EleBriscoe,

This is a hard thing to workaround, and is an old issue.

After a patch, @Ashley did a code behavior where depending on the slope angle, the player could drop or stand in.

And wanting slip over the surface I did a detector anchored to the player, where it detect the slopes angles by overlapping it (by the adjacent side of the triangle formed between the detector and the slope), if it is bigger than a certain angle, this detector will touch it and will push the player to the other side by 1 pixel every desired timelapse.

You can see the detector alive by playing my game on the signature, or looking this videos:

[tube]http://www.youtube.com/watch?v=pJFQftlOdH0[/tube]
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,211
Reputation: 18,373

Post » Wed May 15, 2013 3:23 am

Sorry for the late reply!

I already tried with detectors, buy I can't solve the jittery collision while pushing on the walls even when using one pixel wide detectors (see the updated .capx in the first post).

Is in there something I could do better?
B
10
S
1
G
1
Posts: 13
Reputation: 1,111

Post » Mon Jun 17, 2013 9:50 pm

(bump)
B
10
S
1
G
1
Posts: 13
Reputation: 1,111

Post » Mon Jun 17, 2013 10:17 pm

The jittery movement is caused be a small "fall" taking place (courtesy of the platform behaviour) after you set the X position to +1.

I found it easiest to actually use the platform behaviour itself. Find the angle of the platform beneath the player, and, based on that, simulate movement left or right.

Here's an example I made recently for someone else, based on the platform template. I've since applied it to my own current project and it needs a little tweaking, but the basic functions work fine.
B
56
S
15
G
10
Posts: 910
Reputation: 11,952

Post » Tue Jun 18, 2013 2:21 pm

...simple and elegant! Thank you so much! :)
B
10
S
1
G
1
Posts: 13
Reputation: 1,111


Return to How do I....?

Who is online

Users browsing this forum: armaldio, blackhornet, ETgirl79, TiagoCesar and 18 guests