Movement Unit (RTS)
I write my RTS game (3D), wrote the class of the unit, everything works, but I run across such a problem here - the whole problem in the standard Nav Mesh Agent, which naturally does not have a raycast to check the normal under the unit, to rotate the unit. It turns out that the unit is not moving naturally, especially when it moves through uneven terrain (see screenshots)
So, as I understand, I need to rotate relative to the normal , normal to receive a raycast down from the unit
As I understand it, you need to rotate the Raycast this way (this is not exact):
gameObject.transform.position = hit.point;
gameObject.transform.up = hit.normal;
Help people! Who has any suggestions? Someone worked with this? Well, or in general with the normals? I drew a drawing + screenshots, for a better understanding of my problem:
Your answer
Follow this Question
Related Questions
Tag doesn't work when gameObject is a child of the Main camera? 1 Answer
Making KeyCodes Equal to Touch Triggers? 1 Answer
Strange Raycast problem 0 Answers
Scripting Errors 1 Answer
Spawning objects uNet Client and Local 0 Answers