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

Some questions about collision #401

Closed
rendaoer opened this issue Jul 6, 2024 · 0 comments
Closed

Some questions about collision #401

rendaoer opened this issue Jul 6, 2024 · 0 comments

Comments

@rendaoer
Copy link

rendaoer commented Jul 6, 2024

I created two cards

Self {
            card: Card::default(),
            rigid_body: RigidBody::Static,
            collider: Collider::cuboid(Card::ASPECT_RATIO, 0.2, 1.0),
            sensor: Sensor,
            transform: Transform::default(),
            global_transform: GlobalTransform::default(),
            visibility: Visibility::default(),
            inherited_visibility: InheritedVisibility::default(),
}

Because the animation and movement are controlled by yourself and are not affected by gravity, RigidBody::Static is used.
And add a Sensor, but if you don't use RigidBody::Static, no collision event will occur
If I use RigidBody::Dynamic it will cause the warning "Dynamic rigid body Entity { index: 10, generation: 1 } has no mass or inertia. This can cause NaN values. Consider adding a MassPropertiesBundle or a Collider with mass."
what should I do?

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