summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2024-04-16 18:16:59 +0800
committerchai <215380520@qq.com>2024-04-16 18:16:59 +0800
commit150e1e98d1c6866e0d1fa2abf042f71cc766ed8e (patch)
tree719e265fe600c2814bd2987b7790a7b10cfb8dcb
parent42906830d441ffcca24fba35264644005048e2ca (diff)
*misc
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Camera/CameraMovement.cs37
-rw-r--r--ActiveRagdoll/Assets/TABG/Test.unity13
2 files changed, 16 insertions, 34 deletions
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Camera/CameraMovement.cs b/ActiveRagdoll/Assets/TABG/Scripts/Camera/CameraMovement.cs
index dd21770..08e274a 100644
--- a/ActiveRagdoll/Assets/TABG/Scripts/Camera/CameraMovement.cs
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Camera/CameraMovement.cs
@@ -9,16 +9,14 @@ namespace Rigging.Cameras
public class CameraMovement : MonoBehaviour
{
+ public Player player;
+
public Camera camera;
public Transform positionTarget;
- //public Transform headPosition;
-
public Transform rotationTarget;
- //public Transform bobberTarget;
-
private StandingDataHandler standingData;
private float fallingValue;
@@ -29,22 +27,12 @@ namespace Rigging.Cameras
public bool ADS;
- //public DamageEffects effects;
-
- //private WeaponHandler weaponHandler;
-
private Rigidbody hip;
- //private HasControl hasControl;
-
- //private HeadCollisionHandler headCollisionHandler;
-
private MovementDataHandler movementData;
private Rigidbody torso;
- //private PlayerDeath death;
-
private Strength str;
private Vector3 cameraCurrentRelativeADSPosition = Vector3.zero;
@@ -56,21 +44,15 @@ namespace Rigging.Cameras
private void Start()
{
torso = base.transform.root.GetComponentInChildren<Torso>().GetComponent<Rigidbody>();
- //headCollisionHandler = base.transform.root.GetComponentInChildren<HeadCollisionHandler>();
standingData = base.transform.root.GetComponentInChildren<StandingDataHandler>();
movementData = base.transform.root.GetComponentInChildren<MovementDataHandler>();
- //weaponHandler = base.transform.GetComponentInParent<WeaponHandler>();
camera = GetComponentInChildren<Camera>();
- hip = base.transform.root.GetComponentInChildren<Hip>().GetComponentInChildren<Rigidbody>();
- //hasControl = base.transform.root.GetComponent<HasControl>();
- //death = base.transform.root.GetComponent<PlayerDeath>();
+ hip = player.body.hip.rigidbody;
str = base.transform.root.GetComponentInChildren<Strength>();
- //effects = base.transform.root.GetComponent<DamageEffects>();
}
private void LateUpdate()
{
- //headCollisionHandler.collisionValue = 0f;
if (standingData.sinceLanded > 1f)
{
fallingValue = Mathf.Clamp(standingData.sinceGrounded - 0.5f, 0f, 10f) * 0.5f;
@@ -101,21 +83,8 @@ namespace Rigging.Cameras
private void Update()
{
- //if (hasControl.hasControl)
- //{
- // ADSMovementPosition += movementADSVelocity * Time.deltaTime;
- //}
}
- //private float GetPhysicsValue()
- //{
- // float result = fallingEffectValue * 0.3f + (1f - str.strength) + effects.damageValue;
- // if (death.dead)
- // {
- // result = 1f;
- // }
- // return result;
- //}
}
} \ No newline at end of file
diff --git a/ActiveRagdoll/Assets/TABG/Test.unity b/ActiveRagdoll/Assets/TABG/Test.unity
index af3a164..26fe2ec 100644
--- a/ActiveRagdoll/Assets/TABG/Test.unity
+++ b/ActiveRagdoll/Assets/TABG/Test.unity
@@ -123,6 +123,18 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
+--- !u!114 &368451396 stripped
+MonoBehaviour:
+ m_CorrespondingSourceObject: {fileID: 8128778564773403802, guid: fce18bbf37be1384eb1a089a94aac81d,
+ type: 3}
+ m_PrefabInstance: {fileID: 8128778564773403800}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: ff9a3b3cfb35c564891de827e45f6bb1, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
--- !u!4 &368451397 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1666344766112317020, guid: fce18bbf37be1384eb1a089a94aac81d,
@@ -791,6 +803,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 334643b75d265f8409ae1340eda60cba, type: 3}
m_Name:
m_EditorClassIdentifier:
+ player: {fileID: 368451396}
camera: {fileID: 1848931108}
positionTarget: {fileID: 1414611729}
rotationTarget: {fileID: 1300165644}