浏览代码

Update AgentCubeMovement.cs

/develop/dodgeball-tests
HH 4 年前
当前提交
3cf604b2
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 10
      Project/Assets/ML-Agents/Examples/Dodgeball/Scripts/AgentCubeMovement.cs

10
Project/Assets/ML-Agents/Examples/Dodgeball/Scripts/AgentCubeMovement.cs


// rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
rotationX = ClampAngle(rotationX, minimumX, maximumX);
rotationY = ClampAngle(rotationY, minimumY, maximumY);
// Quaternion xQuaternion = Quaternion.AngleAxis(rotationX, Vector3.up);
// Quaternion yQuaternion = Quaternion.AngleAxis(rotationY, -Vector3.right);
//
// transform.localRotation = originalRotation * xQuaternion * yQuaternion;
// print("look");
Quaternion xQuaternion = Quaternion.AngleAxis(rotationX, Vector3.up);
Quaternion yQuaternion = Quaternion.AngleAxis(rotationY, -Vector3.right);
transform.localRotation = originalRotation * xQuaternion * yQuaternion;
print("look");
}
public bool applyStandingForce = false;

正在加载...
取消
保存