Skip to content

Collision between two boxes #628

@Dmitry-Sedov

Description

@Dmitry-Sedov

I added two collided boxes: 1) the first box is [0.0,0.0,0.0] - [1.0, 1.0, 1.0] 2) the second box is [0.0,0.8,0.0] - [1.0, 1.0, 1.0]. As you can see the second box is completely in the first one and all vertices of the second box are on the sides of the first box. Anyway, for this case the function collide returns penetration value = 1.0. But if we change original boxes like this 1) the first box is [0.0,0.0,0.0] - [1.0, 1.0, 2.0] 2) the second box is [0.0,0.8,0.0] - [1.0, 1.0, 2.0] (we scale them along Z) then "collide" returns penetration = 0. The same value will be if we scale them along Y. My question is how can I detect collisions where one body is completely inside another one and is there solid method to take the maximum penetration depth?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions