Compare commits

..

2 Commits

2 changed files with 5 additions and 5 deletions

View File

@ -455,7 +455,7 @@ namespace Passer.Humanoid {
AddTrackedRigidbody(trackedRigidbody);
}
if (humanoid.physics && grabbedRigidbody)
if (this.physics && grabbedRigidbody)
AdvancedHandPhysics.SetNonKinematic(handRigidbody, colliders);
// This does not work in the editor, so controller input cannot be set this way
@ -796,7 +796,7 @@ namespace Passer.Humanoid {
Object.DontDestroyOnLoad(grabbedObject);
}
if (humanoid.physics)
if (this.physics)
AdvancedHandPhysics.SetNonKinematic(handRigidbody, colliders);
if (grabbedRigidbody)

View File

@ -204,13 +204,13 @@ namespace Passer {
return force;
}
public static Vector3 CalculateForce(Rigidbody thisRigidbody, Vector3 sollPosition, float strength, float damping = 1500) {
public static Vector3 CalculateForce(Rigidbody thisRigidbody, Vector3 sollPosition, float strength, float damping = 25) {
Vector3 locationDifference = sollPosition - thisRigidbody.position;
Vector3 force = locationDifference;
//force += CalculateForceDamper();
//Vector3 damper = -thisRigidbody.velocity * Time.deltaTime * damping;
//force += damper;
Vector3 damper = -thisRigidbody.velocity * Time.deltaTime * damping;
force += damper;
return force * strength;
}