Collision without controlling

Blitz3D Forums/Blitz3D Beginners Area/Collision without controlling

AJirenius(Posted 2006) [#1]
Im probably wrong but heres the way I understand it:
To be able to check for collisions I first must assign all meshes that will be checked to different types.

Then I need to use the Collisions function to set which types that will check for which types.

But what if I DONT want the meshes to stop/slide but still check for collisions? Say that I have a mesh that is supposed to be an explosion.

All meshes within this mesh (colliding with the mesh) will take damage but still not be pushed outside or stopped when colliding with the explosion.
Any other functions for checking for collisions that does not controll the mesh movements?


Matty(Posted 2006) [#2]
I would suggest, assuming 'spherical' explosions that you simply use a radius for the explosion and do a simple distance check between nearby entities and the explosion. As far as I know there is no way of testing for a collision but not responding unless you use "meshintersect" command but I've heard it is slow, and only useful for meshes.

Can't help much beyond that sorry.


AJirenius(Posted 2006) [#3]
Distance check surely does work for me.
Strange though that there is no flag for Collisions that allows the entity to be unaffected :p

Explosion works perfectly now. Nice!


b32(Posted 2006) [#4]
Edited: okay, it wasn't as simple as using resetentity. The mesh needs to be put back at it's position after a collision has been detected:



Sledge(Posted 2006) [#5]

Strange though that there is no flag for Collisions that allows the entity to be unaffected :p



It's because that's intersection, not collision... you can check for that with meshesintersect()

Regardless, we all know what you mean by "no response collisions" and when I need them I tend to do something similar to bram32, only with child entities that are sensitive to various factors (where the parent is not), which makes resetting their positions a bit simpler.


jfk EO-11110(Posted 2006) [#6]
Yeah, no-responce collsion detection. A feature that was requested many times.

This method is about the same as Bram's, I only use HideEntity instead of ResetEntity.

move things
store position of your object
updateworld
check if collided etc.
hideentity object
position at the stored location
showentity object
renderworld

hideentity will completely flush collision state of an object. The point is: before updateworld the collsion responce is not yet performed, so you can store the position. After updateworld, the position is altered/corrected and the collsion state is set.