浏览代码

fixed an issue regarding player jump not getting canceled in a few cases

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

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


private void OnControllerColliderHit(ControllerColliderHit hit)
{
if (isJumping)
bool isMovingUpwards = verticalMovement > 0f;
if (isMovingUpwards)
{
// Making sure the collision is near the top of the head
float permittedDistance = characterController.radius / 2f;

正在加载...
取消
保存