var hitInfo: RaycastHit;
if (Physics.Raycast(transform.position+ Vector3.up, Vector3.down,hitInfo )){
Debug.Log(hitInfo.normal.y);
if(hitInfo.normal.y < SlideThreshold){
slideDirection = new Vector3(hitInfo.normal.x, -hitInfo.normal.y, hitInfo.normal.z);
Debug.Log(";hitInfo.y"+hitInfo.normal.y);
}
}
Raycasthit.normal.y here is always equal to 0.95-1
Can anyone tell me why? It should be 0-1 right?