fix character

This commit is contained in:
Vova
2023-07-11 23:42:50 +03:00
parent 14a6a06159
commit e39c26ed2a
4 changed files with 7 additions and 108 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ public abstract class Character : MonoBehaviour
if (direction == Vector2.down)
rayStartPoint = new Vector2(_capsuleCollider.bounds.center.x + direction.x / 2, _capsuleCollider.bounds.min.y - 0.1f);
else
rayStartPoint = new Vector2(_capsuleCollider.bounds.center.x, _capsuleCollider.bounds.min.y + 0.1f);
rayStartPoint = new Vector2(_capsuleCollider.bounds.center.x, _capsuleCollider.bounds.min.y + 0.06f);
var boundsSize = new Vector2(_capsuleCollider.bounds.size.x - 0.05f, 0.1f);
var raycastHit = Physics2D.BoxCast(rayStartPoint, boundsSize, 0f, direction, 0.1f, _mapLayer);