Angle of movement whilst moving up a slope?

Get help using Construct 2

Post » Sun Nov 10, 2013 2:20 pm

Hi there,

I'm using the platform movement. I wanted the character to speed up/slow down a little moving up and down slopes.

Did some searching round and found people with similar problems but no resolution. I've tried using VectorY and MovingAngle from the player character to check if they're moving up a slope, but the diagonal angle of a slope doesn't show up in these values - they're only triggered when you're in the air.

I.e. how do you check the angle of the ground below you, when you're on the ground?

Thanks in advance.

B
6
S
2
Posts: 81
Reputation: 666

Post » Sun Nov 10, 2013 3:20 pm

I've solved my own problem, but posting the solution to help others.

In the end I used the MovingAngle property of the Platform plugin in conjunction with 'overlap at offset'.

If anyone has any comments (maybe I've missed a simpler solution?), then please let me know.

[hyperlinks are broken - would like to post but can't!]

https://dl.dropboxusercontent.com/u/16226125/ConstructExamples/Platform_slope_slowdown.capx


Hope this helps someone.
Psynaptik2013-11-10 15:27:37
B
6
S
2
Posts: 81
Reputation: 666


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests