Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Position of compound collider seems to be randomly ignored #562

Open
tliron opened this issue Nov 18, 2024 · 0 comments
Open

Position of compound collider seems to be randomly ignored #562

tliron opened this issue Nov 18, 2024 · 0 comments

Comments

@tliron
Copy link

tliron commented Nov 18, 2024

This is a difficult one to explain!

Avian 0.1.2 2D. I am attaching this collider to a rigid body and sprite:

Collider::compound(vec![(
    Position(Vec2::new(0., 19.)),
    Rotation::default(),
    Collider::capsule(12., 12.),
)])

Most of the time when I start my game, it is correct. But 10% of the time (?!) it seems the position is ignored and the collider capsule collider appears at 0,0. Even stranger is that once I explicitly move the entity, the capsule "snaps" to its correct location. (It also moves by itself, via gravity, but that doesn't trigger the "snap" to place.) I'm using PhysicsDebugPlugin to see it.

I'm really stumped with debugging this issue, because it cannot be reproduced reliably. It only happens sometimes.

Any suggestion on where to look to try to understand why this is happening? My guess is that it might have something to do with the SyncPlugin.

@tliron tliron changed the title Position of compound collider seems randomly ignored Position of compound collider seems to be randomly ignored Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant