Open pathunstrom opened 5 years ago
I thought you had one?
Efficient collision detection requires scene-level indexing, though.
@dillonko Used to, before the recent reengineering.
@astronouth7303 Doesn't have to be efficient on first pass. I mostly am looking to give end users a way to check objects during updates.
Eventually, I'd like a collision subsystem that calculates collisions and raises events so end users don't need to optimize that.
I would be concerned about collisions triggering events, namely when in the lifetime it happens.
Like, should it happen immediately whenever the position changes? What if the collision-handling logic collides the objects again? What about the lost context about the move that caused the collision?
Well, for prior art: unity execution order.
It would happen after some event step (probably update) and lets you know that two objects collided during that loop. How to handle it is in userspace, so no context is lost.
Add a method for collision checking. Probably on the sprites.