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

Add collisions #45

Closed
Nicolas-Ferre opened this issue Feb 27, 2022 · 0 comments · Fixed by #100
Closed

Add collisions #45

Nicolas-Ferre opened this issue Feb 27, 2022 · 0 comments · Fixed by #100
Assignees
Labels
type: enhancement New feature or request

Comments

@Nicolas-Ferre
Copy link
Member

Feature
Add automatic calculation of collisions in physics module.

Additional context
To add:

  • CollisionGroups: Into<usize> trait to define collision group configuration, contains fn can_collide_with() -> HashMap<Self, Vec<Self>> method
  • Collider component to define the collision group of the entity

To modify:

  • PhysicsModule has a new generic type that implements CollisionGroups (default: ())

To design:

  • OnCollisionWith to easily configure a collision action for a component
  • Maybe collision groups can be types instead of values (will probably be easier for OnCollisionWith, but not necessarily for Collider)

Dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

1 participant