Oculus Interaction - Grabbing an object starts to jitter and fly away
With the latest update to Oculus Interaction I am not able to grab objects anymore as the methods I used were deprecated. Currently, I have as follows: Hand and Controller Interactors are set up for both left and right. Refer to the attached screenshot. The interactable object having a rigidbody with gravity but no kinematic, box collider, grabbable, hand grab interactable and grab interactable. Issue: (URL to video of issue: https://we.tl/t-XnPdBoyvxe ) When I grab the object it starts to jitter and moves away from my hand but as long as I have my hand pinched or the trigger pressed with the controller I am slightly able to control its movements while it keeps sort of bouncing away from me. If I have kinematic on, the same happens, I am able to change its movements as it flies away from me. Can anyone help please? Part 22KViews1like0CommentsOculus interactions SDK experimental grab force release (Unity)
I am trying to develop a VR app with Unity for Oculus Quest 2. Is there a way to perform force release of currently grabbed objects? I've tried with interactor's Unselect() method but after that grab becomes imposible sometimes, i.e. I can't grab objects with current hand anymore.Solved6.7KViews1like4CommentsProblem: Position constraints of an object with HandTracking (using "OneGrabTranslateTransformer")
(Message a little long to try to explain as well as possible, don't panic, the problem comes down to the question ^^) I also want to say that if you have another solution to this problem, that is to say another method than mine, I'm interested too. The most important thing is that I can implement what I want. Not necessarily the way I imagine it! Thanks in advance for your answers. Hello, In a VR application, where the player uses HandTracking. I want to make him take an object in a bag (The bag is hung on a wall to avoid complicating the problem, and it can't be grabbed). Of course, I don't want the object to go through the bag, so I want to force the player to remove the object from the bottom. For this, I used the script "One Grab Translate Transformer", which allowed me to get the result. I then added a Cube with a box collider, and the option "Is Trigger" checked, to trigger an event when the object comes in contact with it. Here, the event resets the values of "One Grab Translate Transformer" to 0. To disable the constraints. And it works! But unfortunately there is a problem. Of course, after this event, I can move my object in space on the X, Y and Z axes. But my object does not rotate anymore! Why not? Here is a video of the problem : https://youtu.be/U9RYa2u8lsQ In this video (https://www.youtube.com/watch?v=PU8SQ2Obviw), I saw that using a "Box Collider" can prevent objects from passing through other objects. But this doesn't seem to apply to hand-held objects. But I'm probably wrong, so maybe there is a simpler solution on this side. ---- Here is a last video using the objects from the official Oculus example scene, and showing what I want to avoid with a box. Since in the end, my problem can be applied to any box, in any situation: https://youtu.be/WxSXLrMELXw ---- Finally, here is the code: For the "OneGrabTranslateTransformer" script, I didn't change anything, except adding getters and setters to the constraints: public class OneGrabTranslateTransformer : MonoBehaviour, ITransformer { [Serializable] public class OneGrabTranslateConstraints { public bool constraintsAreRelative; public FloatConstraint minX; public FloatConstraint maxX; public FloatConstraint minY; public FloatConstraint maxY; public FloatConstraint minZ; public FloatConstraint maxZ; public bool ConstraintsAreRelative { get => constraintsAreRelative; set => constraintsAreRelative = value; } public FloatConstraint MinX { get => minX; set => minX = value; } public FloatConstraint MaxX { get => maxX; set => maxX = value; } public FloatConstraint MinY { get => minY; set => minY = value; } public FloatConstraint MaxY { get => maxY; set => maxY = value; } public FloatConstraint MinZ { get => minZ; set => minZ = value; } public FloatConstraint MaxZ { get => maxZ; set => maxZ = value; } } … ---------------- For the "FloatConstraint" script, I added a "resetValue()" function that allows to reset the constraint values to 0: namespace Oculus.Interaction { [Serializable] public class FloatConstraint { public bool Constrain = false; public float Value = 0.0f; public void resetValue() { this.Constrain = false; this.Value = 0.0f; } } } --------------- In the Trigger cube script, I simply used the "OnTriggerEnter" function, checking the object tag to avoid triggering the script anyhow: public class EnterTriggerCagoule : MonoBehaviour { public DisableConstraint disable; public string tag = ""; private void OnTriggerEnter(Collider other) { if (other.CompareTag(tag)) { disable.disableConstraint(); } } } ----------------- Finally, this is what my disableConstraint() function looks like: public void disableConstraint() { constraints.MinX.resetValue(); constraints.MaxX.resetValue(); constraints.MinY.resetValue(); constraints.MaxY.resetValue(); constraints.MinZ.resetValue(); constraints.MaxZ.resetValue(); } As you can see, my scripts are not very complicated, and I NEVER touch the rotation values, and I never apply constraints to them. So I am surprised by the problem. Hopefully someone can help me. Sincerely, Xameal.1.4KViews1like0CommentsHand Grab Interactable grab Event?
hey I am having trouble finding out which event I need to catch from the HandgGrabInteractable to then from that event call a function. In my case the Photon.RequestOwnership(), on the grabbed object. Here is what I have until now, with help from ChatGPT, and my own research as to what exists and what it just made up and trying to adjust it acordingly: What it should do is, using the PhotonView component and the Hand Grab Interactable, catch the grab event and then get the target of that grab event (being the object being grabbed) to then find the Objects PhotonView component and then call the RequestOwnership() method on it. Alternative Solutions to come to the same result or advice for it is also welcome.2KViews1like0Comments