[Opensim-users] collision detection for attachments

dz dz at bitzend.net
Sat Mar 23 03:36:34 UTC 2013


I don't know if this solution fits your needs or not.

When I generate NPC's that need to react with an animation, I've found it
much more reliable to have the collision object broadcast a negative
channel message that the attachment listens for.  I use a hash of the NPC
UUID to determine the broadcast channel,  and  the same Hash to open the
listen channel in the attachment code.   Since I equip all my NPC's with an
AO, I have simply added a section of code to trigger the "reaction"
specified by the object that detected the collision.   I have added an
additional listen channel I have designated as a group channel.  I plan to
use the same strategy ( a hash of the group UUID ) to allow me to send
control message to subsets of the NPC population.

As far as the avatar capsule collison shape goes..   I have been unable to
get any consistent results with detectors at ground/foot level.  Not only
is the capsule smallest there, but when NPC's get off track and bounce off
walls or other NPC's, they seem to "gain altitude".   I find that they
often loose contact with the ground and stop triggering lower detectors
completely.  In high traffic areas  I try to keep all of the avatar
detectors in a 1 meter range centered around the waist of an "average"
avatar height.  Not only is this where the capsule is normally widest,  but
it is high enough to "grab" the floating NPC's and trigger an
new-direction/animation  that gets them back to the ground.


D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20130322/67f7a510/attachment.html>


More information about the Opensim-users mailing list