Consider bullet diameter in tank/bullet collision tests
This commit is contained in:
parent
83f0606ea9
commit
8f1fd98cd6
1 changed files with 4 additions and 4 deletions
|
@ -56,10 +56,10 @@ collisionBulletTank (b, b') (tank, tank') = (not ((between bx minx maxx) && (bet
|
|||
V.Vector bx by = (rotp tank) . (transp tank) $ bulletPos b
|
||||
V.Vector bx' by' = (rotp tank') . (transp tank') $ bulletPos b'
|
||||
|
||||
minx = -tankLength/2
|
||||
maxx = tankLength/2
|
||||
miny = -tankWidth/2
|
||||
maxy = tankWidth/2
|
||||
minx = -(tankLength+bulletDiameter)/2
|
||||
maxx = (tankLength+bulletDiameter)/2
|
||||
miny = -(tankWidth+bulletDiameter)/2
|
||||
maxy = (tankWidth+bulletDiameter)/2
|
||||
|
||||
collisionTankTank :: ((Tank, Tank), (Tank, Tank)) -> ((Tank, Tank), (Tank, Tank))
|
||||
collisionTankTank ((t1, t1'), (t2, t2')) = ((t1, t1'), (t2, t2'))
|
||||
|
|
Reference in a new issue