Cailean Finn
8 months ago
8 changed files with 5283 additions and 149 deletions
File diff suppressed because it is too large
@ -0,0 +1,47 @@ |
|||||
|
using System.Collections; |
||||
|
using System.Collections.Generic; |
||||
|
using Cinemachine; |
||||
|
using UnityEngine; |
||||
|
using UnityEngine.Pool; |
||||
|
|
||||
|
public class FindTargetAnimationRagdool : MonoBehaviour |
||||
|
{ |
||||
|
private Transform m_LookAt; |
||||
|
private Transform m_Follow; |
||||
|
private CinemachineVirtualCamera m_VirtualCamera; |
||||
|
private bool m_Search = false; |
||||
|
private GameObject m_Ragdoll; |
||||
|
|
||||
|
private void Start(){ |
||||
|
m_VirtualCamera = this.GetComponent<CinemachineVirtualCamera>(); |
||||
|
} |
||||
|
|
||||
|
private void Update(){ |
||||
|
if(!m_Search){ |
||||
|
try{ |
||||
|
|
||||
|
m_Ragdoll = GameObject.Find("RagdollForMocap"); |
||||
|
|
||||
|
if(m_Ragdoll != null){ |
||||
|
m_Search = true; |
||||
|
SetupVirtualCameraSettings(); |
||||
|
} |
||||
|
|
||||
|
} catch { |
||||
|
Debug.Log("Ragdoll Animator not found."); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private void SetupVirtualCameraSettings(){ |
||||
|
//Do something
|
||||
|
Debug.Log("Found."); |
||||
|
m_LookAt = m_Ragdoll.transform.Find("articulation:Hips"); |
||||
|
m_Follow = m_Ragdoll.transform.Find("articulation:Hips"); |
||||
|
|
||||
|
|
||||
|
|
||||
|
m_VirtualCamera.LookAt = m_LookAt; |
||||
|
m_VirtualCamera.Follow = m_Follow; |
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 79a62bbe0c1d09648811dfd58e63b974 |
||||
|
MonoImporter: |
||||
|
externalObjects: {} |
||||
|
serializedVersion: 2 |
||||
|
defaultReferences: [] |
||||
|
executionOrder: 0 |
||||
|
icon: {instanceID: 0} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
File diff suppressed because it is too large
@ -0,0 +1,7 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 8e4461c8c94b7a149aae1a5b7a9f1945 |
||||
|
PrefabImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
@ -1 +1 @@ |
|||||
{"count":1,"self":119.86694399999999,"total":124.50362799999999,"children":{"InitializeActuators":{"count":1,"self":0.0020386,"total":0.0020386,"children":null},"InitializeSensors":{"count":1,"self":0.0009555,"total":0.0009555,"children":null},"AgentSendState":{"count":7072,"self":0.061914,"total":1.0812046,"children":{"CollectObservations":{"count":3536,"self":0.9843132,"total":0.9843132,"children":null},"WriteActionMask":{"count":3536,"self":0.0049786,"total":0.0049786,"children":null},"RequestDecision":{"count":3536,"self":0.0299988,"total":0.0299988,"children":null}}},"DecideAction":{"count":7072,"self":2.5077692,"total":2.5077691,"children":null},"AgentAct":{"count":7072,"self":1.0434105,"total":1.0434105,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714478128","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\drecon-unity -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-cail -hubSessionId 60ab91bb-e88b-415d-bad5-85669cb2f254 -accessToken igrlSuBmRMV_tJv_LBLFXMbOAtqeySRX9_MYTnwkljU005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1714478252"}} |
{"count":1,"self":68.620896,"total":71.1414624,"children":{"InitializeActuators":{"count":1,"self":0.0009998,"total":0.0009998,"children":null},"InitializeSensors":{"count":1,"self":0.0020001,"total":0.0020001,"children":null},"AgentSendState":{"count":3851,"self":0.0296706,"total":0.5101487,"children":{"CollectObservations":{"count":1926,"self":0.4604354,"total":0.4604354,"children":null},"WriteActionMask":{"count":1926,"self":0.0026497,"total":0.0026497,"children":null},"RequestDecision":{"count":1926,"self":0.017393,"total":0.017393,"children":null}}},"DecideAction":{"count":3851,"self":1.4214537999999999,"total":1.4214537999999999,"children":null},"AgentAct":{"count":3851,"self":0.58545589999999992,"total":0.58545589999999992,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714482096","unity_version":"2022.3.5f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.5f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\drecon-unity -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-cail -hubSessionId 60ab91bb-e88b-415d-bad5-85669cb2f254 -accessToken igrlSuBmRMV_tJv_LBLFXMbOAtqeySRX9_MYTnwkljU005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"DreconDemo","end_time_seconds":"1714482167"}} |
Loading…
Reference in new issue