浏览代码

Update Character.cs

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

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


gravityContributionMultiplier = Mathf.Clamp01(gravityContributionMultiplier);
verticalMovement += Physics.gravity.y * gravityMultiplier * Time.deltaTime * gravityContributionMultiplier; //Add gravity contribution
//Note that even if it's added, the above value is negative due to Physics.gravity.y
//Cap the maximum so the player doesn't reach incredible speeds when freefalling from high positions
//Cap the maximum so the player doesn't reach incredible speeds when freefalling from high positions
verticalMovement = Mathf.Clamp(verticalMovement, -maxFallSpeed, 100f);
}
else

正在加载...
取消
保存