Definition at line 167 of file AVR_Grabbable.cs. 180 _objType = (isGrabbedByMultipleHands && objectType.changeObjectTypeOnTwoHanded) ? objectType.typeOnTwoHanded : objectType;
183 if (Vector3.Distance(targetItemPosition, targetHandPosition) > last_dist && last_dist > _objType.Break_grab_distance)
204 while (angle > 180) angle -= 360; // Prevent object from doing sudden >180° turns instead of negative <180° ones
219 // The current world acceleration is rb.velocity - lastVel. However, due to sudden changes in the objects position, we prevent the acceleration from jumping to
221 // Lower the value of 0.5 to make the world acceleration more delayed/elastic, but also lower the jitter an object may experience
226 worldvel -= worldvel.normalized * Mathf.Min(worldvel.magnitude, 10); //10 == minimum force applied by hand
245 while (angle > 180) angle -= 360; // Prevent object from doing sudden >180° turns instead of negative <180° ones
257 // Difference between point where object was grabbed at and current hand/palm position (normalized over a few frames)
265 Vector3 delta = force - Vector3.Lerp(Vector3.zero, cvel, k * Vector3.Distance(AttachedHands[0].grabPoint.position, closestp));
List< AVR_BasicGrabProvider > AttachedHands List of hands that are currently grabbing this object. Definition: AVR_Grabbable.cs:44 GrabbableObjectType objectType Type that describes the objects behaviour when grabbed. Definition: AVR_Grabbable.cs:16 bool isGrabbedByMultipleHands True if the object is being grabbed by 2 or more hands, otherwise false. Definition: AVR_Grabbable.cs:63 float Angular_Lightness Definition: GrabbableObjectType.cs:39 GrabbableObjectType typeOnTwoHanded Definition: GrabbableObjectType.cs:34 |