浏览代码

Merge branch 'bug-steep-surfaces'

/main
mwert09 4 年前
当前提交
f063f571
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 7
      UOP1_Project/Assets/Scripts/Characters/Character.cs

7
UOP1_Project/Assets/Scripts/Characters/Character.cs


// check if the controller is grounded and above slope limit
// if player is grounded and above slope limit
// player has to slide
currentSlope = Vector3.Angle(Vector3.up, hitNormal);
shouldSlide = currentSlope >= characterController.slopeLimit;
if (characterController.isGrounded)
{
currentSlope = Vector3.Angle(Vector3.up, hitNormal);
shouldSlide = currentSlope >= characterController.slopeLimit;
}
}
}
正在加载...
取消
保存