need collision help.

Blitz3D Forums/Blitz3D Beginners Area/need collision help.

MusicianKool(Posted 2010) [#1]
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?


dawlane(Posted 2010) [#2]
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


MusicianKool(Posted 2010) [#3]
thats odd, the documentation says 1 to countcollisions(ent) inclusive.
they lied.


dawlane(Posted 2010) [#4]
Hold on changing that line skips the rest of commands in the for/next loop. Guess I've been up too long :o


MusicianKool(Posted 2010) [#5]
ok one more question, If you were to move a mesh, not the entity, why does'nt collisions work?




Ross C(Posted 2010) [#6]
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.


MusicianKool(Posted 2010) [#7]
so if i switch them it should work? doesn't seem to though?


Adam Novagen(Posted 2010) [#8]
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.


MusicianKool(Posted 2010) [#9]
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.


Ross C(Posted 2010) [#10]
You can't have a polygon to ellipsoid collsion. Basically you won't be able to use blitz collisions like this.