When two of the same entities collide...

Blitz3D Forums/Blitz3D Programming/When two of the same entities collide...

D_Town_Tony(Posted 2004) [#1]
I have a bunch of the same typ of characters on the screen and don't want them to overlap when they walk into each other, the Blitz collision doesn't seem do this, any tips on how to get this to work?


Bot Builder(Posted 2004) [#2]
If they are both spheres, have collisions set up (collisions command), have radius's set up, and have collision types set, then as long as they don't move to fast it should work. (You would have the same numbers for the first two parameters of collisions)


kalimon(Posted 2004) [#3]
easy: make manual collisions.

Load all of those coordinates into an array. Calculate distance. Calculate Angle. if distance < bodyradius, move or stop.

Don't stop using entity colision as they're useful for all other collisions.

A special case would be than always you'd have on the array a distance 0 with the self, so make an if dist < bodyradius and > 0 then bla bla.