- Home /
How to spawn an infinite slope/hill going down or up
What I'm trying to do is literally the same thing as in this tutorial: https://www.youtube.com/watch?v=HIsEqKPoJXM , except that I want to spawn the tiles going down (or up) at an angle, with the player running down on it following the exact angle at which the terrain is tilted to. Essentially making an endless hill instead of an endless bridge.
It's the same process. You can either take the rotation into account when placing hill parts or put everything around them at an angle to give the illusion they are going downhill if that would work with your camera setup.
Answer by Arano · Sep 18, 2019 at 07:58 AM
The way i did this a few years back for a school project is to have prefabs of 'bridge parts', every bridge part would have a empty game object called 'snapping object' attached to the end of the bridge where you would connect the next part (keeping the rotation of the snapping object). you could do the same with adding random obstacles to bridge parts.
ps. playing with the camera, the angle of the player/obstacles and a rotated skybox might be enough to give the illusion of a steep hill, u might not need to make it angled at all.
Your answer
![](https://koobas.hobune.stream/wayback/20220612212309im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
how to apply force on correct direction in wall jump using Rigidbody 2 Answers
Help change the subject of this Script 1 Answer
Rotatearaound a moving object 1 Answer