Collisions problem
|
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
11-24-2006 02:31
I have a situation where I need to detect collisions between multiple rotating prims.
The prims have to be phantom.
There is a script in each prim in which I set llVolumeDetect and then in the body of the script collision_start. However what happens is that when the prims collide they do not pick up a collision, but when I walk through them they do. I have even tried as an experiment making one of the prims non-phantom, but the collision still does not register.
Am I doing this wrong, or is there an alternative way of doing it? Thanks.
|
|
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
|
11-24-2006 04:49
Volume detecting prims only register physical objects.
|
|
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
|
11-24-2006 05:37
How are the prims rotating? If they are rotating using TargetOmega, the server isn't aware of the rotation, so it won't raise collision events.
|
|
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
|
11-24-2006 07:43
That may be it in part, but he's using Volume Detect, which allows a prim to go phantom and still raise collision events. However, objects that are not physical will still not register.
He could have his volume detecting prims float right through a wall and it wouldn't recognize anything...but if anything utilizing physics hits them, then they will register (such as he stated with his AV)
|
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
11-24-2006 17:22
Yes, I am using TargetOmega.
|
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
11-25-2006 04:19
OK - could anybody tell me what I *should* be using?
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
11-25-2006 08:13
Not without more information, no.
I suspect you'll end up with a really nasty object. I suspect you're going to need physical prims and llApplyRotationalImpulse/llGetTorque etc. to get the spinning. You'll then need position correction as well.
With that lot you've things that the sim is actually paying attention to correctly, and so llVolumeDetect will work.
Some other approach, perhaps a ring around the collision zones and some maths to work it out will work better, but that will never be 100% reliably tied to the appearance in world if that's critical.
Knowing what you're trying to do in a bit more detail might help someone suggest something else though.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
11-25-2006 23:44
1.) I do not believe 'llVolumeDetect()' objects will detect collisions with each other (or with other phantom objects, for that matter).
2.) 'llTargetOmega()' DOES work on PHYSICAL objects, and actually updates their orientation server-side. Therefore collision detection SHOULD be possible (if other factors such as the above don't interfere).
3.) If you are scripting both objects, maybe you don't need collisions at all. Have the objects announce to each other their (dimentions and?) positions periodically (well, maybe only have one announce and one listen), then do your own calculations to figure out if they have collided or will collide.
|
|
Selador Cellardoor
Registered User
Join date: 16 Nov 2003
Posts: 3,082
|
11-26-2006 04:12
Yes, it looks as though I will be reduced to doing that. The only problem is that there will be about eight scripts running at the same time, all detecting collisions with each other, so I imagine this would be both resource-hungry and slow. But I will give it a try.
Many thanks.
|