Im playing with newton physics collision detection. Only place can think where to detect to is:

Code:
 
function NewtonCollisionEndEvent(material)
{

//i have added this part
if ((my != p_vehicle) && (you != null)) {
// ########## do what ever i want here...
}


var sound;
var volume;
var error;

sound = NewtonMaterialGetSoundEffect (material);

if (sound) {
if (maxCollisionSpeed > MIN_IMPACT_SPEED) {
error = (maxCollisionSpeed - MIN_IMPACT_SPEED);
volume = 10 + error * error * 0.05;
if (volume > 100) {
volume = 100;
}

if (my.Skill28 < total_frames) {
my.Skill28 = total_frames + SOUND_IMPACT_DELAY;
ENT_playSOUND (my, sound, volume);
}

if (you.Skill28 < total_frames) {
you.Skill28 = total_frames + SOUND_IMPACT_DELAY;
ENT_playSOUND (you, sound, volume);
}
}
}
}



Problem is how do i detect difference between level blocks & an entity?