Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Detect Melee Hits?

Crash Pointe
Registered User
Join date: 26 Aug 2006
Posts: 14
09-29-2007 18:43
Is there a possible way to detect melee based hits without having to rely on the weapon sending out some sort of signal of attack? For example, let's say any weapon could be used. Even those which are not compatible to certain combat systems. Is there any way to detecting such hits?

Detecting projectiles is no problem but I am completely stumped on how it is accomplished with melee based attacks since the object is attached to the end-user AV.

I have tried both collision*() and llVolumeDetect() already with no luck. Would it have to be a sensor? I would like others input on this. Thanks.
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
09-29-2007 19:47
This is another issue related to client-side-only avatar animation. Attachments must be phantom and non-physical, since the server has no way of telling exactly where they are located or oriented, as that is handled asynchronously by each individual client.

The most you can determine from the server side is the position and orientation of the avatar and the time the weapon strike was initiated. From there you calculate if a potential victim is located within the striking arc.
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
09-29-2007 20:39
Well... such a melee strike is essentially nothing more than an animation. You can poll to see what animations an avatar is playing. But it's not efficient, you'd have to search for one or more particular animations, and though I don't have much experience in that area, at the moment I'd have to say it seems backwards. It seems like the weapon itself needs to detect and react to hits.
_____________________