- Home /
Angle Based on Terrain
For my game, I have following type of terrains.
Static Terrain Creation Programmatically
I want to set angle of my main character body based on terrain curve. At present I am working on raycasting to achieve this but didn't get full success.
So what is the preferred way to solve this problem?
probably won't be of much help, but last time I tackled this, I tried to get the surface normals of the terrain and alight my characters rotation according to them..
Answer by haim96 · Mar 10, 2014 at 01:28 PM
i used some code from this great article: http://www.gamasutra.com/blogs/AdamWinkels/20140220/211306/DevLog_7_Learning_How_to_Walk.php
the code not completed but the most imported parts are there. works great for me...
they also using raycast ins$$anonymous$$d of physics... by the way...
Thanks this help give me a chance to learn new concept.
great! by the way, if you already managed to create system that create the kind of terrain i will be happy to hear about it... and don't forget to close the thread if you got the right answer for you. :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613135859im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Using Layer Filter Raycast 0 Answers
Jelly Object for 2D Game 2 Answers
raycast and trigonometry 2 Answers
Set custom policy for mono developer 0 Answers