Closed laifrank2002 closed 5 years ago
Probably a server issue, or maybe the missile's radius is too small. It's drawn more than twice as large as it actually is. Maybe I'll change that.
Either my eyes aren't right or there's a server bug; That would just cause the missile to glide pass harmlessly. It's the changing the angle of the asteroid that I'm concerned about.
So, to clarify, the bug is that the torpedo is affecting the asteroid, but the asteroid is not affecting the torpedo?
Yes. I'm guessing that whichever one of these is responsible for doing collisions is working, but the check for explody is not. Try looking into the torpedo object.
Each projectile (blaster bullets, torpedos, sonic cannon bubbles, etc) has a collision()
method. Usually, this deactivates the projectile and returns its damage.
But... Projectiles (with the exception of the sonic cannon bubble) are also bodies. I'm guessing that the asteroid checked for collision detection with the torpedo as a body first. This means that the asteroid moved out of the way. When it checks for collision detection with the torpedo as a projectile, since it already moved out of the way, it does not register as a hit.
I've redone the collision detection. Now, asteroids don't move out of the way when it gets it. Instead, only its vector is updated. This should fix the problem.
If you hit an asteroid just right, the asteroid moves slightly, but the missile continues on as if nothing has happened.