October 26, 2021, 03:59:37

Author Topic: simple tank collision  (Read 421 times)

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2483
simple tank collision
« on: August 09, 2021, 08:13:08 »
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 :)

Offline blinkok

  • Sr. Member
  • ****
  • Posts: 381
Re: simple tank collision
« Reply #1 on: August 10, 2021, 03:39:58 »
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
« Last Edit: August 10, 2021, 03:49:33 by blinkok »

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2483
Re: simple tank collision
« Reply #2 on: August 10, 2021, 06:27:09 »
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 :)

Offline blinkok

  • Sr. Member
  • ****
  • Posts: 381
Re: simple tank collision
« Reply #3 on: August 10, 2021, 06:47:00 »
Quote
especially the box with the lines to the wheels
Yeah, simulating a car whith wheels

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal