Collision Detector – Detect, when node is inside a node

Forum Forums Visual Components 4.1 Python Programming in VC Collision Detector – Detect, when node is inside a node

This topic contains 3 replies, has 2 voices, and was last updated by JuergenB JuergenB 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16839
    JuergenB
    JuergenB
    Participant

    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

    Attachments:
    You must be logged in to view attached files.
    #17077
    JuergenB
    JuergenB
    Participant

    Is the question unclear? 😉

    #17109
    Avatar
    CaptainFeature
    Participant

    Hy Jürgen,

    question is clear! 😉

    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

    Attachments:
    You must be logged in to view attached files.
    #17116
    JuergenB
    JuergenB
    Participant

    That’s perfect. Thanks a lot!

     

    Best Regards,

    Jürgen

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.