jasharpe / tanks

A pygame tank game
tanks
3 stars 0 forks source link

Improve wall collision resolution #4

Open jasharpe opened 13 years ago

jasharpe commented 13 years ago

Currently when a tank hits a wall, it simply kills all of its velocity. It would be better if it just killed its velocity in the direction perpendicular to the wall, while allowing the tank to "slide" along the wall. This would help prevent players from getting stuck, and help AI not be stupid.

jasharpe commented 13 years ago

Made an attempt at this, but the tank tends to look really jittery and this is harder than I expected. Leaving it on the table for now.