How do I create a sliding motion in x y plane?

Get help using Construct 2

Post » Wed Sep 09, 2015 1:49 am

Hi everyone,

I am making a game where the player can move in 4 or 8 directions. There is this area where the surface is ice so I want the character to slide on it. For example from point A to point B, if the character is walking towards right when he touch on the ice surface then he'll slide all the way to the far end of right until he hits a solid object or reach normal surface. While he's sliding, all movements are disabled.

Hopefully someone can provide some clues and direction for me to look into. I tried physics behaviour but it didn't work as intended. Perhaps I'm missing something here.
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Wed Sep 09, 2015 2:27 am

You could set the acceleration and deceleration to zero when overlapping the ice. Then set it back to higher values when not on the ice.
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Wed Sep 09, 2015 2:55 am

@R0J0hound

Thanks. How about if there's a normal ground in the middle of the ice? I can't get it to decelerate and stop exactly on top of it.
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Wed Sep 09, 2015 3:18 am

You could maybe use a smaller sprite pinned the the player sprite and use that instead to check for overlaps.
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests