Collision Detector - Detect, when node is inside a node

Hello,

I am currently working with the vcCollisionDetector, setting NodeListA and NodeListB and checking if a collision happened with testOneCollision.

I found out that a collision is only detected, when the bounding boxes are colliding. A collision is NOT detected, when a node from NodeListA is inside a node from NodeListB.

After that I thought of using vcVolumeDetector. However, using this detector requires to set (and always update) the corners and the transformation matrix in case this node is moving.

Is there a way to detect a collision even when the node is inside another node with the convenience of using NodeListA and NodeListB.

The reason why I like the nodelists is because I can change them without carrying about setting and updating corners/transformations and I am able to have multiple nodes in either list.

Thank you for your help!

PS.: a simple example is attached

Test_CollisionDetectors.vcmx (23.7 KB)

Is the question unclear? :wink:

Hy Jürgen,

question is clear! :wink:

Unfortunately, collisions are only detected when the volumes overlap.
That’s why I modified your script a bit!
I hope my solution is usable for you?

Best Regards

CaptainFeature

CollisionDetection.vcmx (119 KB)

That’s perfect. Thanks a lot!

 

Best Regards,

Jürgen