#IntersectShape No Collision Detected

3 messages · Page 1 of 1 (latest)

sick copper
#

Hi! I'm having trouble detecting collision with Intersect shape. This is my code:

GetWorld2D().DirectSpaceState.IntersectShape(new PhysicsShapeQueryParameters2D {
            CollideWithAreas = true,
            Shape = new CircleShape2D() {
                Radius = 16f
            },
            Transform = new Transform2D(0f, position),
            CollisionMask = 2
        });

I'm getting no collisions detected.

When I increase the radius really hight, it does, which makes me think somehow the position is being used wrong. I know the position value is correct since objects being spawned at that position work. The position is a GlobalPosition.

#

IntersectShape No Collision Detected

sick copper
#

Yeah I have no idea what's going on. This is the shapes (circles) being placed for debug while the tile shapes(rectangles) are right on top. Still no collision detection.