Box to Box Collisions?

Blitz3D Forums/Blitz3D Programming/Box to Box Collisions?

Gabriel(Posted 2004) [#1]
There are a hundred things I could use these for. And now there are several ways I can get them. I could use Tokamak, but I'm not keen. It's more than I need, and I don't really like Physics Packs. They always have a certain "feel" to them. They're like ready meals. All the ingredients are there but it just don't have that feel you like.

I could use ColDet. Don't know much about it yet, but I've downloaded the wrapper EliasT kindly wrote and I'm gonna have a look.

Or I could use MeshesIntersect(). I'm pretty sure it's fast on low poly meshes like cuboids, right?

Or maybe there's another way.

Speed is good, I like speed, but I'm also concerned about the amount of feedback I get ( collision points, normals, etc ) So any thoughts, considerations and recommendations would be appreciated.


Rottbott(Posted 2004) [#2]
MeshesIntersect() on invisible boxes is very fast.

You must do a quick EntityDistance() check first though for maximum speed, because there's no point doing the accurate box check if you're a million miles away :-)


(tu) sinu(Posted 2004) [#3]
i do it that way to and speed is great as boxes are only a few triangles and if your checking a distance and maybe if one box is moving too(which is alsi kinda what distance is doing).


Gabriel(Posted 2004) [#4]
Yeah, I have used MeshesIntersect in the past and although I didn't use boxes, I did use low poly proxy meshes and didn't run into any speed problems. Back in those early days of my coding experience, I didn't even use any distance checks.

But you don't get any feedback from MeshesIntersect() do you? For instance, you don't get the point of collision between two objects, right?


Rottbott(Posted 2004) [#5]
No, you don't get a position or normal for it. You can use the entity positions and sizes to get an approximate direction to do the collision response, however.


slenkar(Posted 2004) [#6]
Whats a good algorythym to make the hit entity translate(move) in the right direction when it is hit?

(like snooker physics but in 3D)

I also dont know how to calculate the speed