浏览代码

Merge pull request #45 from Quickz/jump-fix

Fixed an issue regarding player jump not getting canceled in a few cases
/main
GitHub 4 年前
当前提交
506101f1
共有 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;

正在加载...
取消
保存