I’ve created an object that’s meant to be a VR hand. It will check if anything is overlapping it, get the item overlapping it, disable its physics and make itself the parent of an objects root, the idea being the hand will take any object overlapping it when the grab button is pressed and attach it to itself as if it has been grabbed.
For some reason even though it grabs and drops the item fine the first time, the second time it will not pick it up, through some experimentation it seems its grabbing the root of the object but not the rest of the mesh, which stays on the floor. Stopping it from re-enabling physics when dropping the item solves this issue but I need gravity, the only solution I can find that allows me to keep gravity is to parent the hand to the mesh of the object instead of the root but this will also cause issues
I’ve asked a few people and no one can work out why this is happening, either the root has been unparented from the rest of the object which I don’t think is possible or physics isn’t being disabled during grab despite my telling it to
Does anyone have any idea why this is happening, any help would be amazing
an image of my code below: