Jump to content

Collision with an invisible prim/mesh


Booser Audion
 Share

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

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

Recommended Posts

Hi.

I try to use an invisible box to find out if any avatar has passed the area. When i make a collsion script that shows me when an avatar collides it gets triggered fine. But when i make the prim phantom so i can walk trough it it does nothing. I searched the lsl functions and there where only methods that say it does not work on phantom prims. But i have seen this more than once inworld. Also it must be possible to get the information what did happen inside my prim.

 

And the follow up question is then. When it works, can i get the direction in which the avatar collided with the prim?

 

Thanks a lot

Booser

Link to comment
Share on other sites

Thanks, that was the olution for it. I already tried the volume detection but it seems, that I had an error in my setup so it did not function like I wanted it. But now I was a bit smarter and tried it with the given example and it works @.@

Sometimes the easiest things are the best :)

Thanks a lot for helping me.

 

Booser

Link to comment
Share on other sites


Booser Audion wrote:

[ .... ]

And the follow up question is then. When it works, can i get the direction in which the avatar collided with the prim?

 

Thanks a lot

Booser

You could use llDetectedTouchFace() or you could ask llDetectedVel().  There are other ways too, but those are a start.

Link to comment
Share on other sites

Hello and thanks.

When i lookup LlDetectedTouchFace it says that it only detects when an avatar clicks on a surface. It returns TOUCH_INVALID_FACE when the detected event was no touch. That could work but it does have more meanings then just this. It could be that the viewer is not capable for that feature. And when it says TOUCH_INVALID_FACE it doesn't say which face was not touched.

But llDetectedVel does the trick for checking the right direction.

Thanks a lot.

 

Booser

Link to comment
Share on other sites

Yes, you're right. Sorry about that.  You could create your own equivalent of a function that behaves like llDetectedTouchFace() for collision events, but it's more work.  You know where your colliding object is at the time of collision and you know where the thing it ran into is.  You can get those vectors with llGetPos() and llDetectedPos().  With a little bit of math, you can find out which side of the target object was hit.  Still, llDetectedVel () is probably quicker.

Link to comment
Share on other sites

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