Skip to content

Add body, is it colliding? #478

@ghost

Description

Looked around but don't see an easy way to do this. When adding a body to the world, is there a way to easily ask if that body is "on top" (colliding with) any existing body? Tried to process "collisionStart/End" but it looks like those happen only as bodies move around.

Two additions:

  • To explain: I need to detect if an application drag/drop event, which normally would add a body to my world, would result in a colliding body. If so, I want to change its collisionFilter characteristics.
  • I've studied the code in the MouseConstraint and think it will work for me with some modification.

So comments would be welcome, otherwise you can close this issue. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions