Search found 2 matches
- Sat Dec 14, 2024 11:32 pm
- Forum: Support and Development
- Topic: enemy/projectile collisions stops working when colliding with 2 or more bullets
- Replies: 5
- Views: 1160
Re: enemy/projectile collisions stops working when colliding with 2 or more bullets
...By the way, I think callbacks would be the ideal pattern for this projectile hit behavior, where you only need to react once when the event happens. So you could be processing the projectile hits inside the callback you give to Windfield's :setPreSolve(), instead of polling every frame with enem...
- Fri Dec 13, 2024 5:52 am
- Forum: Support and Development
- Topic: enemy/projectile collisions stops working when colliding with 2 or more bullets
- Replies: 5
- Views: 1160
enemy/projectile collisions stops working when colliding with 2 or more bullets
This is the code I'm using to detect collisions for projectiles in my game: code.png From the windfield physics library, I'm using its collider:enter('name') function which is basically just the beginContact callback for box2D, and it works perfectly fine until multiple bullets try to hit an enemy a...