more precise positioning after ground is found

This commit is contained in:
in0finite 2019-10-22 04:57:53 +02:00
parent a06fd323db
commit 615f8d33cd

View file

@ -351,7 +351,7 @@ namespace SanAndreasUnity.Behaviours
private void OnFoundGround(RaycastHit hit, int numAttempts, string customMessage) { private void OnFoundGround(RaycastHit hit, int numAttempts, string customMessage) {
this.transform.position = hit.point + Vector3.up * characterController.height * 1.5f; this.transform.position = hit.point + Vector3.up * (characterController.height + 0.1f);
this.Velocity = Vector3.zero; this.Velocity = Vector3.zero;
Debug.LogFormat ("Found ground at {0}, distance {1}, object name {2}, num attempts {3}, {4}, ped {5}", hit.point, hit.distance, Debug.LogFormat ("Found ground at {0}, distance {1}, object name {2}, num attempts {3}, {4}, ped {5}", hit.point, hit.distance,