Jump to content

Is Vector inside other object/object's bounding box


Ruthven Ravenhurst
 Share

You are about to reply to a thread that has been inactive for 2911 days.

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

Recommended Posts

I have an idea for a game. Objects are placed around a sim/area for avatars to find. Simple enough hunt right? Except these objects will be "alive" and I want them to move around on a timed interval until someone clicks it, which would then tell it to move to a specific location, and be recorded that said clicker found n many of the objects. I've got most of the logic in my head with an idea of how to script it. But I want to make sure the objects won't land inside of another object, making it "impossible" for an avatar to see it. Maybe with llCastRay?
Link to comment
Share on other sites

Actually, cast rays can detect phantom objects just fine.  You need to specify  RC_DETECT_PHANTOM among your options, is all.  The real problem, of course, is that if your phantom object is inside another object, the cast ray will detect the other object first.  If you know its UUID, though, you can always get its position with llGetObjectDetails in a fast timer or, less efficiently, with a repeating sensor.

Link to comment
Share on other sites

You may be overthinking the problem.  Why not just make yourself a list of a couple dozen preset locations and then flip through them randomly?  You'll know for sure that none of them is inside another object, and you won't have to do any tricky scripting. Choose a new spot from the list and llSetRegionPos.

Link to comment
Share on other sites


Rolig Loon wrote:

Actually, cast rays can detect phantom objects just fine.  You need to specify  
among your options, is all.  The real problem, of course, is that if your phantom object is inside another object, the cast ray will detect the other object first.  If you know its UUID, though, you can always get its position with
llGetObjectDetails
in a fast timer or, less efficiently, with a repeating sensor.

Oops, I didn't read carefully enough!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2911 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
 Share

×
×
  • Create New...