Collision issues

Blitz3D Forums/Blitz3D Programming/Collision issues

try this


If CountCollisions(car)>0

nx = CollisionNX#(car)
ny = CollisionNY#(car)
nz = CollisionNZ#(car)

Else

nx = 0
ny = 0
nz = 0

EndIf


TFormVector nx,ny,nz,0,car

tCarmNX = TFormedX()
tCarNY = TFormedY()
tCarNZ = TFormedZ()



then check the tCarNZ value, if it's below 0 ie -value then the back of the car collided.

ps it maybe at +value depending on the car orientation in the modelling app.