浏览代码

fix hip rotation

/docs-update
Hunter-Unity 5 年前
当前提交
d29cc962
共有 3 个文件被更改,包括 63 次插入4 次删除
  1. 2
      Project/Assets/ML-Agents/Examples/SharedAssets/Resources/OrientationCube.prefab
  2. 55
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity
  3. 10
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgentDynamic.cs

2
Project/Assets/ML-Agents/Examples/SharedAssets/Resources/OrientationCube.prefab


m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2591864627374185740}
m_LocalRotation: {x: -0, y: -0.7071066, z: -0, w: 0.707107}
m_LocalPosition: {x: 0.08911133, y: 0.101310015, z: -0.07713318}
m_LocalPosition: {x: 0, y: 0.119, z: 0}
m_LocalScale: {x: 0.7764428, y: 0.7764428, z: 0.7764428}
m_Children:
- {fileID: 3256674261123397973}

55
Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity


propertyPath: m_Name
value: DynamicPlatformWalker (2)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_LocalPosition.x

type: 3}
propertyPath: m_Name
value: DynamicPlatformWalker (3)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

propertyPath: m_Name
value: DynamicPlatformWalker (11)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_Name
value: DynamicPlatformWalker (4)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_Name
value: DynamicPlatformWalker (6)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_Name
value: DynamicPlatformWalker (5)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_Name
value: DynamicPlatformWalker (7)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_LocalPosition.x

type: 3}
propertyPath: m_Name
value: DynamicPlatformWalker (8)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

propertyPath: m_Name
value: DynamicPlatformWalker (9)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_Name
value: DynamicPlatformWalker (1)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_LocalPosition.x

type: 3}
propertyPath: m_Name
value: DynamicPlatformWalker (10)
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4715983678655513245, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

10
Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgentDynamic.cs


EnvironmentParameters m_ResetParams;
private GameObject m_OrientationCube;
public Quaternion cubeRotation;
public Quaternion hipsRotation;
m_OrientationCube.transform.SetParent(transform.parent);
m_OrientationCube.transform.SetParent(transform);
// m_OrientationCube.transform.SetParent(transform.parent);
UpdateOrientationCube();
m_JdController = GetComponent<JointDriveController>();

// oCubePos.y = -.45f;
m_OrientationCube.transform.position = oCubePos;
m_OrientationCube.transform.rotation = m_WalkDirLookRot;
cubeRotation = m_OrientationCube.transform.rotation;
hipsRotation = hips.rotation;
}

正在加载...
取消
保存