- Home /
Question by
HittmanA · Aug 02, 2017 at 05:57 PM ·
terrainraycastinginverse kinematic
How do you set foot IK to terrain height?
I am trying to do some IK on a characters foot so that the foot's rotation is equal to the terrain below it. How would I do this using raycast (so I get the correct angle directly below the foot)? It should also be independent of the foot's local or global rotation.
Comment
Answer by Menyus777 · Aug 04, 2017 at 09:45 PM
TerrainData.GetSteepness
https://docs.unity3d.com/ScriptReference/TerrainData.GetSteepness.html
Your answer
Follow this Question
Related Questions
How to restrict building on uneven surfaces? 2 Answers
Terrain height raycasting? 1 Answer
Raycasting doesn't hit terrains 0 Answers