- Home /
How can I follow the terrain
I want to know how I can lerp from my current position, to another position, while hugging the terrain. Imagine I'm doing something like surfing, or skateboarding, where I need to follow the rail...etc. I've tried simply projecting from the location down to the plane to get the projection vector, but this will have problems if it's not flat. If it's bumpy, or if there are slopes, there are problems. Any ideas?
yes there are solutions to this kind of problem as it is a fairly common thing to be done in a lot of games. If you want specific help to your specific setup then please provide way more details.
perhaps a screenshot of what "bumpy" means for you in your game. There are just too many unknown things to add a proper answer to your current problem.
Not sure how to help you then. The level of bumpiness should not matter, the goal is that it should handle all slopes and all angles.
there is a huge difference between a slope and rugged terrain with smaller holes than the object we are talking about. Both can be seen as bumpy. It can help a lot if some things can be excluded from the equation.
either way: Can you at least describe what you mean be "there are problems"? what kind of problems? what did you expect to happen? what did not work? where exactly is your current solution not sufficient? Also have you tried using colliders or did you just go for raycasts?
Your answer
Follow this Question
Related Questions
Comparing lerping quaternion 1 Answer
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
How to determine if rotation is clockwise or anticlockwise 2 Answers
Change slider value based off of relative mouse movement 1 Answer