How do I fix my angle detection movement?

Get help using Construct 2

Post » Tue Nov 29, 2016 4:00 pm

Message: shadowfan33 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?

I want to make my character change its angle properly on slopes.
While searching the forum, I found a good and easy example to do it but it doesn't work properly - the detectors doesn't work at certain angles for some reason, i couldn't find why.
I've used the built in platform movement for this example to make it as easy as possible.
Can you tell me how to fix it? I want to make a game where my player can run fully on slopes and loops.


Here's a link for the example:
Posts: 16
Reputation: 532

Post » Tue Nov 29, 2016 4:36 pm

Interesting question, it's recurrent here.

You have two choices, the first one and easy, but not 100% perfect is make some invisible sprites as detectors and place them attached to your player, so, make for example 6 detectors, 3 on both sides and them an event to detect which angle is the slope and change the player angle according until the detector stop detecting the slope, also, make slopes in a group named properly to make it easy to the detector identify a slope, otherwise, your player will become crazy in any exception.

The second way, better and used for example in games like Sonic, you'll make each slope and looping with a specific ID, when the player touch it, you'll need to set an event to detect what side is him facing and change the angle according.

Look my very dust old and abandoned sample here to understand what I mean by detectors, for example:

or download this sample of Sonic and use it: ... .capx?dl=0
Posts: 1,388
Reputation: 22,956

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 53 guests