Jump to content
You are about to reply to a thread that has been inactive for 1556 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted

I am creating a bomb here. This bomb is represented by the green dot in the attached picture. This bomb is initially hidden from people's sight. When someone enters the bomb range, the bomb will wait for 5-6 seconds, then detonate.

Now, here comes the real question..

When I use llSensor, I was easily able to detect avatars within 8 meters. It simply detects avatars in sphere shape. (represented as the left green dot in the picture)

However, I am not sure how I would detect avatars that are within the range represented by cylinder shape (represented as the right green dot in the picture, the cylinder has 16 diameters and 25 meters tall.)

I tried to use llVolumeDetect so anyone hitting this cylinder would be considered "hit by bomb". The problem is that the collision happens only when an avatar collides with the cylinder. The collision never happens when the cylinder collides with an avatar. So using llVolumnDetect is an out of option.

 

compare.jpg

Posted (edited)

Use a sensor where the radius equals the height of the cylinder.

For every avatar detected, adjust their elevation to be on the same level as the center of the cylinder (green dot). Then llVecDist to see how far away the are.

If llVecDist is greather than the radius of the cylinder (width, not height), they are outside of the cylinder and can be ignored.

364820cd0d.png

Edited by Wulfie Reanimator
  • Like 1
You are about to reply to a thread that has been inactive for 1556 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...