1
\$\begingroup\$

I'm not sure if this is possible, but Im working a 2D project to has randomly generated loops (imagine a sin or cos graph). I have a 2D character (a quad for now). I want my character want to ski a long the slopes. The bottom surface always needs to be in contact with the terrain, unless it's a sudden slope change. Im trying to use to rigidbody for this, but when going down slopes the character just bounces and rolls down the hill. What can I fix this?

\$\endgroup\$
  • 3
    \$\begingroup\$ Possible duplicate of How to achieve 2D ski movements similar to Alto Adventure? \$\endgroup\$ – Tyyppi_77 Jun 5 '16 at 6:26
  • \$\begingroup\$ I'm not denying that they are similar, I have a lot of trouble phrasing my questions. In this question I was strictly asking about how to control Rigidbody physics down a slope. In the first question I was exploring the possibilities I had for 2d ski movements. Since I'm new to game development I thought there would be a few a standard solutions for tackling this problem. Anyways I have tweaked the questions for more clarity the 2 questions. \$\endgroup\$ – Pav Dis Jun 5 '16 at 12:31
1
\$\begingroup\$

I'm not sure if I understood the problem right but maybe you can limit the Z rotation of the character to a certain angle so it can't tumble when you are going downhill. But if you also want your character to be able to flip in the air at certain heights for extra points or whatever your score system is, you can set the rotation limit only if the player is closer to the ground for a certain distance.

\$\endgroup\$
1
\$\begingroup\$

Changing the gravity scale of the game (under physics2d settings inspector) could be a solution, but I still won't suggest it, since the jumps based on physics will get affected by it. You could always increase the force applied when jumping, though.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.