How do I turn gravity by 90° on wall collision?

Get help using Construct 2

Post » Tue Dec 20, 2016 11:40 am

Message: invesar can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi, I really need help with this one, because I have no clue how to solve this.
The idea is to turn the camera, the player and the gravity by 90° when he/she hits a wall - so that the wall will become a new platform to stand on (for the player and npcs).
My Problem is, that I cant achive the exact 90° angle. :|

Here you can see what I mean.
https://www.youtube.com/watch?v=JBkvxESJS28&feature=youtu.be

Image

I do really appreciate your help thx :D
B
2
Posts: 1
Reputation: 152

Post » Tue Dec 20, 2016 3:00 pm

Using lerp you'll never achieve 90 degrees because lerp is an amortization feature. To avoid it, check something near to the desired and when triggered, change to the final position.

Image

You can SET the angles of layout, gravity and anything else you want. I prefer this way instead of rotating while using lerp.
Image
B
104
S
23
G
17
Posts: 1,350
Reputation: 22,028


Return to How do I....?

Who is online

Users browsing this forum: Ryan Kocourek and 3 guests