Hello everyone!
I would like to ask you a question:
how can I get the inclination of surface of a 3D model using raycast?
My current code is the following:
function Update () {
var hit : RaycastHit;
var fwd = transform.TransformDirection (Vector3.forward);
if (Physics.Raycast (transform.position, fwd, 10)) {
print ("There is something in front of the object!");
}
thanks in advance!