浏览代码

input fix

/hh-develop-fps_game_project
HH 4 年前
当前提交
f7b4daac
共有 3 个文件被更改,包括 13 次插入19 次删除
  1. 16
      Project/Assets/ML-Agents/Examples/FPS_Game/Prefabs/PlayerCubeWithGun.prefab
  2. 13
      Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity
  3. 3
      Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/AgentCubeMovement.cs

16
Project/Assets/ML-Agents/Examples/FPS_Game/Prefabs/PlayerCubeWithGun.prefab


m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 0, z: 0}
m_LookaheadTime: 0.2
m_LookaheadSmoothing: 1
m_LookaheadTime: 0
m_LookaheadSmoothing: 0
m_HorizontalDamping: 0.1
m_HorizontalDamping: 0
m_VerticalDamping: 20
m_ScreenX: 0.5
m_ScreenY: 0.68

m_SoftZoneHeight: 0.8
m_BiasX: 0
m_BiasY: -0.000000074505806
m_CenterOnActivate: 1
m_CenterOnActivate: 0
--- !u!114 &1227455083
MonoBehaviour:
m_ObjectHideFlags: 0

m_EditorClassIdentifier:
m_BindingMode: 1
m_FollowOffset: {x: 0, y: 2, z: -5}
m_XDamping: 1
m_XDamping: 0
m_ZDamping: 1
m_ZDamping: 0
m_YawDamping: 1
m_YawDamping: 0
m_RollDamping: 0
m_AngularDamping: 0
--- !u!1 &1517390717

groundPoundForceMode: 1
groundPoundForce: 35
spinAttackSpeed: 20
agentRotationSpeed: 2
agentRotationSpeed: 200
agentJumpVelocity: 15
agentFallingSpeed: 50
cam: {fileID: 0}

13
Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity


m_Modifications:
- target: {fileID: 1517390719, guid: 497c5a1fa56ff4204a66acfb42a8ebde, type: 3}
propertyPath: m_LocalRotation.x
value: 0.087676235
value: 0.08767625
value: -0.0000000039375903
value: 0.00000002600996
value: 3.4656758e-10
value: -0.0000000022892717
objectReference: {fileID: 0}
- target: {fileID: 2170513384791859414, guid: 497c5a1fa56ff4204a66acfb42a8ebde,
type: 3}

propertyPath: cam
value:
objectReference: {fileID: 1828481695}
- target: {fileID: 2170513384791859415, guid: 497c5a1fa56ff4204a66acfb42a8ebde,
type: 3}
propertyPath: agentRotationSpeed
value: 300
objectReference: {fileID: 0}
- target: {fileID: 2170513384791859417, guid: 497c5a1fa56ff4204a66acfb42a8ebde,
type: 3}
propertyPath: m_Name

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1828481691}
m_LocalRotation: {x: 3.4656758e-10, y: 0.99614906, z: -0.087676235, w: 0.0000000039375903}
m_LocalRotation: {x: -0.0000000022892717, y: 0.99614906, z: -0.08767625, w: -0.00000002600996}
m_LocalPosition: {x: 0, y: 1.9999999, z: 6.4973907}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []

3
Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/AgentCubeMovement.cs


rb.angularVelocity = Vector3.up * spinAttackSpeed;
}
var allMoveInput = inputH + inputV;
if (allMoveInput != 0)
if (inputH != 0 || inputV != 0)
{
var dir = cam.transform.TransformDirection(new Vector3(inputH, 0, inputV));

正在加载...
取消
保存