Mesh not selectable after bone transform. What am I missing?

Hi, Im working on project that should allow me to manipulate a model in VR.

Now the problem is that once i move a bone or transform node the viewport will update but the collisions wont. So if i for example click another time in the same spot, it will move the object again even if its not there anymore. At the same time if i click the moved mesh part, it wont even raycast!
Is there some operation to apply to update the picking mechanism? Is it about bounding boxes?
Let me know if you ever dealt with something like that. Thanks!

Found a solution but its like very very slow

basically after applying the transform update the bounding box

pickResult.pickedMesh.refreshBoundingInfo(true, !true)

…but it might take literally seconds. I’m doing it wrong?

Hello!

I believe this is the way to go.

???

It takes 0.2 ms on my machine.

Yeah after removing some crap it got better. It becomes slow when you try to make many rotations subsequently. Like click fast and many time the leg at same place, the once it moves click it again many times asap…at some point it will become unresponsive.
I tried GPU bbutility method but that didn’t work at all.
It got better now… not instant but ok. For my use case should be plenty enough! Thanks

1 Like

You can try to use the new bounding box helper:

Depending on your meshes, it’s not always faster than refreshBoundingBox, so you should test to make sure it’s a gain in your case.

@Evgeni_Popov sure, will try again and let you know. Last time didn’t work but maybe this time it will