Jondolf / avian

ECS-driven 2D and 3D physics engine for the Bevy game engine.
https://crates.io/crates/avian3d
Apache License 2.0
1.54k stars 120 forks source link

Despawned entitiy in CollidingEntities? #533

Open kraftwer1 opened 1 month ago

kraftwer1 commented 1 month ago

I'm using the latest avian3d (0.1.2) with the latest bevy (0.14.2).

After despawining an entity that has a collider, CollidingEntities still lists that entity. Is this the intended behavior? Meaning that it lists all collisions that have ever happend (like a report)? Or should it only list the collisions happening right now?

This is the entity that is still listed after despawn():

commands
    .spawn((
        PbrBundle {
            mesh: meshes.add(Sphere::new(1.)),
            material: materials.add(Color::from(css::STEEL_BLUE)),
            transform: Transform::from_xyz(0., 2., 0.),
            ..default()
        },
        Collider::sphere(1.),
        CollisionLayers::new(GameLayer::Earth, [GameLayer::Spaceship]),
        Earth,
    ))