Compare commits
No commits in common. "e75e412d107c407494537903efb49462c9905c24" and "1e7dc017623fd2654e1ed85fe9c3c25ed51e44d0" have entirely different histories.
e75e412d10
...
1e7dc01762
@ -455,7 +455,7 @@ namespace Passer.Humanoid {
|
||||
AddTrackedRigidbody(trackedRigidbody);
|
||||
}
|
||||
|
||||
if (this.physics && grabbedRigidbody)
|
||||
if (humanoid.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 (this.physics)
|
||||
if (humanoid.physics)
|
||||
AdvancedHandPhysics.SetNonKinematic(handRigidbody, colliders);
|
||||
|
||||
if (grabbedRigidbody)
|
||||
|
||||
@ -204,13 +204,13 @@ namespace Passer {
|
||||
return force;
|
||||
}
|
||||
|
||||
public static Vector3 CalculateForce(Rigidbody thisRigidbody, Vector3 sollPosition, float strength, float damping = 25) {
|
||||
public static Vector3 CalculateForce(Rigidbody thisRigidbody, Vector3 sollPosition, float strength, float damping = 1500) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user