I am creating a snowboarding game and would like my player to be able to jump on a rail and move along it if it lands on it.

I have no idea how to approach this. I have already tried using ray casts and waypoints but nothing works. I need to make sure the player moves along the rail, from any point that the player jumps onto it: e.g. if they land in the middle of the rail they keep following its curve from that point. The rails are not straight and have curves on them.

How can I get my player to be able to jump on a curved rail like this, and start sliding from the point they jumped onto it?

  • \$\begingroup\$ How have you set up your rails so far? (eg. how do you express the curves you want, do they have physics colliders, etc?) How did you try applying raycasts and waypoints to the problem? Those sound like workable building blocks, so we might be able to help you solve problems in your current implementation rather than inventing something new from whole cloth. \$\endgroup\$ – DMGregory May 17 '19 at 17:38

Your Answer

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

Browse other questions tagged or ask your own question.