Creating a collision system to collide with anything implementing a collision component. #4593
Unanswered
The-DevBlog
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm creating a simple, 2d, top-down shooter. I've implemented a very simple collision system, but currently it only works between the player and the enemies, and not between the enemies. I would like this system to work between any entity implementing the collision component.
This is the function signature for the collision system. How could I construct this to work between any entity that has a collider? My initial thought was using generics of some sort, but I'm getting a little turned around on where to start.
Enemy spawn system.
Player spawn system.
Beta Was this translation helpful? Give feedback.
All reactions