diff options
-rw-r--r-- | ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs | 13 | ||||
-rw-r--r-- | ActiveRagdoll/Assets/TABG/Test.unity | 5 |
2 files changed, 6 insertions, 12 deletions
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs b/ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs index 742ad29..8cc245d 100644 --- a/ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs +++ b/ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs @@ -54,10 +54,7 @@ namespace Rigging.Action data.sinceJump += Time.fixedDeltaTime; movementVector += inputHandler.inputMovementDirection * animationForceAmounts.current; movementVector *= friction; - //for (int i = 0; i < allRigs.GetAllRigs().Length; i++) - //{ - // allRigs.GetAllRigs()[i].AddForce(movementVector * multiplier, ForceMode.Acceleration); - //} + allRigs.AddForceToAll(movementVector * multiplier, ForceMode.Acceleration); } @@ -74,18 +71,10 @@ namespace Rigging.Action private IEnumerator AddJumpForce() { float counter = 0f; - //for (int i = 0; i < allRigs.GetAllRigs().Length; i++) - //{ - // allRigs.GetAllRigs()[i].velocity = new Vector3(allRigs.GetAllRigs()[i].velocity.x, 0f, allRigs.GetAllRigs()[i].velocity.z); - //} allRigs.ModifyVelocityForEach((_rig) => { return new Vector3(_rig.velocity.x, 0f, _rig.velocity.z); }); while (counter < jumpCurve.keys[jumpCurve.length - 1].time) { counter += Time.deltaTime; - //for (int j = 0; j < allRigs.GetAllRigs().Length; j++) - //{ - // allRigs.GetAllRigs()[j].AddForce(Vector3.up * multiplier * jumpForce * jumpCurve.Evaluate(counter) * Time.deltaTime, ForceMode.Acceleration); - //} allRigs.AddForceToAll(Vector3.up * multiplier * jumpForce * jumpCurve.Evaluate(counter) * Time.deltaTime, ForceMode.Acceleration); yield return null; } diff --git a/ActiveRagdoll/Assets/TABG/Test.unity b/ActiveRagdoll/Assets/TABG/Test.unity index f7f0b77..2f78873 100644 --- a/ActiveRagdoll/Assets/TABG/Test.unity +++ b/ActiveRagdoll/Assets/TABG/Test.unity @@ -1096,6 +1096,11 @@ PrefabInstance: propertyPath: animationForceAmounts.values.Array.size value: 2 objectReference: {fileID: 0} + - target: {fileID: 3805300644640191623, guid: fce18bbf37be1384eb1a089a94aac81d, + type: 3} + propertyPath: animationForceAmounts.values.Array.data[1] + value: 7 + objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: fce18bbf37be1384eb1a089a94aac81d, type: 3} --- !u!1001 &8277099497161960097 |