simple tank collision

Started by iWasAdam, August 09, 2021, 08:13:08

Previous topic - Next topic

iWasAdam

I wanted to try out a new approach for vehicle to vehicle collision.
Rotating around a central point seemed to suit tanks, so I went with a base tank model.

The red tanks is under my control (left/right/forward) the green tank is just reacting.
It's not perfect, but it's exactly the thing I was looking for :)

blinkok

#1
Nice.
I did this using box 2D trying to get a kart game working. The track hit areas were extracted from the model.
it was nifty because box2d handled all the physics. You can see the box2D shapes in green
Apologies for the appauling handling. It was early days.



https://www.mediafire.com/file/3yibpgx07zctim8/Kart.rar/file

iWasAdam

interesting
especially the box with the lines to the wheels. my code uses something similar with a single point drawing the four corners and then checking the hit boxes (point in quad) and modifying the result :)

blinkok

Quoteespecially the box with the lines to the wheels
Yeah, simulating a car whith wheels