Detect Mesh Contact

Blitz3D Forums/Blitz3D Beginners Area/Detect Mesh Contact

Hardcoal(Posted 2014) [#1]
Is there a way to detect to entities contacts without the collision
stop.
I mean I want the entities to penetrate each other and not stop each other when they meet.
but still I want to detect collision.


GfK(Posted 2014) [#2]
Two ways, really, that I can think of. Admittedly 3D isn't really my 'bag'.

From what I remember you can use MeshesIntersect(), but it's not very fast so you may not want to be doing lots of it.

Second, use proxy objects for the collision. You basically have two meshes for each object - the visible one, and an invisible (alpha=0) which is parented to the visible mesh. You test for collisions between invisible objects - they'll stop when they collide, while the visible object will not.


Hardcoal(Posted 2014) [#3]
the best easiest way I found is using EntityDistance() command
and by giving each entity a radius i can detect ball collision.


RemiD(Posted 2014) [#4]
Some ideas :
you can use one or several colliders for each moving entity, move the entity, and when a collider (emitter) collides with a "collidable" (receiver), you can get the infos about the collision, then you delete the collider, then you move the entity at the desired position, then you recreate another collider depending on the entity position, this way the collider (emitter) may be able to go through another "collidable" (receiver)
or
you can use one mesh as a hull for each entity (preferably low tris), each loop do a distance check to see if the entities are near enough and if yes do a meshesintersect check.
or
you can use one or several linepicks for each entity to act as a kind of sensor to analyze the environment and detect a "pickable" (receiver)
or
use a 3d shape intersection calculation (sphere vs sphere, sphere vs box, box vs sphere, box vs box, ...)


Mikorians(Posted 2014) [#5]
I bagged it with blitz's collider system (it's ok), and went with freeware col_det library- it's 50x faster! But RemiD is right- use simple representatives to compare against each other, it's faster!