NetworkGrabbable can be pushed after Client rejoin
Hi Developers and geniuses, I have a weird bug and maybe someone can help me with it. So right now, we have three different versions of a Grabbable as BuildingBlocks: Grabbable - Can be grabbed but not pushed with a finger. TouchHandgrab - Can be pushed with a finger and interacts way more realistic Network Grabbable Object - Can also not be pushed with a finger, but can be grabbed and has Network components on it (Client network Transform). Now here comes the weird part: In our application, when somebody gets thrown out because of network issues and rejoins, the Network grabbable he THEN grabs (takes over Ownership), he then afterwards can MOVE them with his finger! But only those he has Ownership over and only after he was disconnected once from the server. We are totally at a loss why this happens. We tried "giving back" the ownership after releasing the object, but that is not working well because of several following problems. Any idea, why suddenly, after rejoining, the Network Grabbable behaves like a TouchHandgrab and you can push network objects around with your finger? It's something we can not test in the Simulator and there is no good way to debug directly in the app on the quest. Best Regards Florian Buchholz275Views0likes0CommentsPhysics grabbable wrong calculate (Solved) mb some have this problem
The problem at hand is that when I grab an object and try to throw it, it behaves unpredictably, sometimes stopping abruptly and other times flying in the opposite direction. Upon investigation of how it works, the following chain of events can be observed: There is a GrabInteractor that interacts with the GrabInteractable (which can be HandGrabInteractable/ControllerGrab, etc.). Then, the Interactable checks for the presence of a PhysicsGrabbable (a component that applies force upon release). Additionally, there is a VelocityCalculator that calculates the force to be applied. If the VelocityCalculator is absent, the object will enable its physical properties but will stop since the Velocity is set to 0. Alright, so we've figured that out. However, the connected calculator is acting strangely and launching in random directions. The issue lies in the linkage. The Interactor passes information about the HandGrabInteractable along the chain instead of the object itself, which may be located at different points. This is because it also handles the visual positioning of the hand (as shown in the photo). But we need it to calculate the object. Fortunately, most of the necessary fields are accessible, and we can refer to the Rigidbody of the interacting object, thereby adding the Rigidbody property to the HandGrabInteractor script: protected override void InteractableUnselected(HandGrabInteractable interactable) { base.InteractableUnselected(interactable); this.Movement = null; ReleaseVelocityInformation throwVelocity = VelocityCalculator != null ? VelocityCalculator.CalculateThrowVelocity(interactable.Rigidbody.transform) : new ReleaseVelocityInformation(Vector3.zero, Vector3.zero, Vector3.zero); interactable.ApplyVelocities(throwVelocity.LinearVelocity, throwVelocity.AngularVelocity); } I have highlighted the added section in the script.1.5KViews0likes1Comment