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?
Hello

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.

Thanks.

Here's a link for the example: https://www.mediafire.com/?znqzyczmn24hqvq
B
4
S
1
Posts: 16
Reputation: 507

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:
https://www.youtube.com/watch?v=pJFQftlOdH0

or download this sample of Sonic and use it: https://www.dropbox.com/s/bdjlvpo2bv5cy ... .capx?dl=0
Image
B
108
S
24
G
18
Posts: 1,374
Reputation: 22,826


Return to How do I....?

Who is online

Users browsing this forum: androidpro and 12 guests