[Opensim-users] collision detection for attachments

dz dz at bitzend.net
Sun Mar 24 16:11:54 UTC 2013


I would have to qualify my answer, given your response..

The NPC collisions I deal with involve avatars bumping into various objects
in the course of them walking and running about in a region.  The majority
of my sensors are at street intersections where I can make the  NPC to
react to red/green lights, or send them off in another direction.  I also
use them to trigger pause and reach animations for doors,  or sometimes
trigger reactions when encountering "Special" NPC's.  The speed of the
moving avatar is much lower than the speed of a bullet, and the solution I
use limits the number of objects in a sim that cause reactions.  Too many
scripted objects / simultaneous collisions can be a serious performance
issue.

I have not attempted to apply this design to an object like a bullet.   My
understanding is that best SL solution to that problem it to use the
orientation of the gun ( or gun sight ) and location of the target to
pre-determine if the bullet will hit/miss.  Scripters in SL are using the
llCastRay function to perform this intersection determination.  [ I cant
say if or when llRayCast is/will be implemented in OpenSim, or what its
performance would be like compared to SL.]  The bullets are still
expended,   but in order to minimize the accumulation of spent ammo, the
bullets just "fly and die", removing themselves after a brief period of
time.   In that instance,  you can certainly have the GUN broadcast a HIT
message to the avatar, but I don't think its a good plan to script bullets
to be generating and processing collision events.



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


More information about the Opensim-users mailing list