Rotate Volume Detector

Hi there!

I’m trying to detect collisions in my simulations, and I decided not to use vcCollisionDetector objects, because they often cause my simulations to lag. The vcVolumeDetector objects are much better, but I cannot find a way to rotate them. For example, if I want to envelop a component with a volume detector box to detect all collisions with that component, and the component can be approximated with a box that is not rotated with respect to the World node, then the volume detector box fits very well (see first figure in the image below). If I want to rotate the object, the volume detector box no longer covers the component appropriately (see second figure in the image below), so I can end up detecting false collisions or not detecting real collisions. I came up with the solution of mapping the surface of the component with multiple volume detector boxes (see third figure in the image below), but this seems like a lot of work, and also I want to keep my code simple. I have tested the ‘Transformation’ property of vcVolumeDetector objects, and I was only able to translate volume detector boxes, but not rotate them (I tried with rotateRelZ and rotateAbsZ).

Thank you

Maybe you can place the volume detector to a link node inside the component and rotate the link.
My guess is that the volume detector only supports axis-aligned bounding volume for simplicity and making the math faster to execute.

btw. I have also heard that sometimes the volume detector can be buggy. Depending on how you set up the frames the actual detection volume might not be what one could expect.

1 Like

Yeah, that’s my guess, too. By ‘buggy’, you mean like this? Volume Detector problem