lazd / DuneBuggy

A 3D multiplayer dune buggy battle game written entirely in JavaScript
Other
10 stars 5 forks source link

Buggy hits own bullets when driving at high speeds and firing forward #23

Open lazd opened 11 years ago

lazd commented 11 years ago

When driving at high speeds and firing forward, left, or right, the buggy will collide with its own bullets, causing them to bounce in odd directions.

It would be nice to disable collision interactions with one's own bullets, but I don't think it's possible. Instead, the current code does not remove the bullet from the map if it hits one's own buggy (which may be wrong anyway).

This could be solved by starting the bullet further away from the buggy (outside of the buggy's boundary), including buggy velocity with bullet velocity, or possibly spawning the bullet at the position it should be at the next tick (not current tick).