Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Filerting collisions

Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
10-27-2005 20:03
I'm working on something that will be worn as an attachment, and I would only like to handle collisions with other avatars. Is there any way to do this other than:

CODE

collision_start(integer num_detected)
{
if (llDetectedType(0) != AGENT)
{
return;
}

// Do my stuff
}


?

It appears that if you're walking on anything other than land, you generate collisions with every step, so the handler ends up getting called a lot. llCollisionFilter seems to only work for specific objects, not a type of object. What would be ideal would be something similar to the parameter in llSensor(), but I'm not sure if anything like that exists for collisions?

Thanks,
Ziggy

Edited to fix typo in title. Though it looks like it only changes the post title, not the thread title :)
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
10-28-2005 10:19
Sadly, the answer is no. The code you've got there is the only way to do it... I've wished for this before. The good news is, I think it's probably less of an impact than you think it is.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
10-28-2005 10:28
Thanks.