polygon to polygon collision
Blitz3D Forums/Blitz3D Programming/polygon to polygon collision
| ||
I'm trying to get some proper physics responses using blitz collision but since we only have spherical collision... Am I missing something or do I have to write my own collision routine to handle polygon->polygon collision? |
| ||
Do your own - take a look at Coldet though: http://www.freewebs.com/elias_t/coldetwrapper.htm I've not used it. |
| ||
Thanks a bunch puki. That collision lib is exactly what I was looking for. Much gratitude to elias also. It's a wonder no one has used this to make a blitz physics system that rivals newton or tokamak. |
| ||
As fast as coldet is, I had problems with inaccurate collision normals with large scales - however I didn't establish if it was the wrapper or coldet itself. Just so you're warned... However if you're not interested in collision normals you should be ok. |
| ||
Bah, I need the collision normals. =( The colliding_nx1() etc I'm reading back isn't the collision normals. So I guess I'm still serach for polygon collision. |
| ||
Actually, it looks like you can get the collision normals in coldet. I'm just messing about with it until I figure it out. |
| ||
Oh yes, you can. I'm just saying I'm not sure I'd trust them 100% of the time... |
| ||
Yep, I saw your other post about coldet and getting the collision normals. I was getting them before but wasn't sure because of them being 4 also. But I normalized em too. I'm trying to use coldet to get the basic cube dropping to the ground and bouncing around. |
| ||
I think there's actually a polygon-to-polygon collision command. MeshesIntersect? |
| ||
Your are right sir! I'm wondering how slow it is though. Has anyone done any speed tests on it and I wonder if it returns collision normals. Will test when I get home. |
| ||
It is a slow routine - period. Not for large scale use. |
| ||
I wouldn't use MeshesIntersect. Whether its slow or not, there lies the potential for objects to pass through each other undetected in cases where they're moving faster than a certain speed (related to the size of the objects in question). |
| ||
This, or if object a is completely encapsuled inside object b. As far as I know meshesintersect will also not return Normals. If you really are after "proper physics responses" then you maybe better use one of the physics libraries, eg. ODE. One solution would be to position a pivot on every vertex of object A, then simply use sphere against polygon with every pivot. If there are too many pivots in the scene then you may have to use a pivot contingent, eg. 3000 pivots or so for the whole world, that are placed dynamicly, using vertex coorinates with tformpoint - which is probably slow too. |