You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Object Manipulator now maintains velocity on release (#9733)
* Velocity and Angular Velocity now calculated for XRSDK controllers
* removing debug statements
* object now maintains controller velocities on near interaction
* Update Assets/MRTK/SDK/Features/Input/Handlers/ObjectManipulator.cs
Co-authored-by: Kurtis <[email protected]>
* moved velocity setting back to the rigidbody null protected block
* added tests for far throwing with far interactions
Co-authored-by: Kurtis <[email protected]>
// With simulated hand angular velocity would not be equal to 0, because of how simulation
268
+
// moves hand when releasing the Pitch. Even though it doesn't directly follow from hand movement, there will always be some rotation.
269
+
Assert.Zero(rigidBody.angularVelocity.magnitude,"Object should have maintained its angular velocity of zero being released.");
270
+
Assert.IsTrue(rigidBody.velocity!=hand.GetVelocity()&&rigidBody.velocity.magnitude>0.0f,"ObjectManipulator should not dampen it's velocity to match the hand's upon release.");
271
+
272
+
// This is just for debugging purposes, so object's movement after release can be seen.
273
+
yieldreturnhand.MoveTo(initialHandPosition);
274
+
yieldreturnhand.Hide();
275
+
276
+
GameObject.Destroy(testObject);
277
+
yieldreturnnull;
278
+
}
279
+
226
280
/// <summary>
227
281
/// This tests the one hand near movement while camera (character) is moving around.
228
282
/// The test will check the offset between object pivot and grab point and make sure we're not drifting
0 commit comments