need collision help.
Blitz3D Forums/Blitz3D Beginners Area/need collision help.
| ||
ok so i got them setup correctly, but when i try to access the collided triangles i get a MAV. here is the gist of the problem. it errors on : ver0 = (TriangleVertex(surf,tri,0)) but why? |
| ||
Try changing For i = 1 To CountCollisions(sph)to For i = 1 To (CountCollisions(sph) - 1) I think it could be exceeding the number of collisions |
| ||
thats odd, the documentation says 1 to countcollisions(ent) inclusive. they lied. |
| ||
Hold on changing that line skips the rest of commands in the for/next loop. Guess I've been up too long :o |
| ||
ok one more question, If you were to move a mesh, not the entity, why does'nt collisions work? |
| ||
Because, your entity has an ellipsoid collision, which is centred around the *entities* 0,0,0. Moving the mesh away from this centre, doesn't not move the ellipsoid, and there is no way to move it last time i checked. You can move the STATIC entity type's mesh no problem as it's checking against the polygons of the mesh though. |
| ||
so if i switch them it should work? doesn't seem to though? |
| ||
Why would you NEED to move the mesh instead of the entity itself? Think of it this way, moving the entity literally moves the whole entity or object. Moving the mesh just moves the polygons, while the entity itself stays put. |
| ||
well im trying to create verlet meshes. so each vertex becomes a verlet point. and it incorporates gravity. so i just move each vertex to the calculated verlet point. you know, to make jello cubes and the like. yet blitz has no triangle-triangle intersect so cant scan mesh collisions for yourself. hmm, i just need to use world coord's some how. |
| ||
You can't have a polygon to ellipsoid collsion. Basically you won't be able to use blitz collisions like this. |