Collision help
|
Raz Rutledge
Registered User
Join date: 13 Aug 2004
Posts: 12
|
11-21-2004 16:51
I have an non-physical object that I'm moving every second using llSetPos(). The object has a 'collision' event that doesn't seem to be triggered when it collides with another object in its path, and neither object is set to phantom. Plus, I've put my AV in the path of the moving object, but it moves right through me, and only triggers the collision event if I happen to move my AV while the object is passing through me. I tried collision_start, too, but it isn't working. Am I using the collision event correctly?
thanks
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
11-21-2004 17:24
I don't think that an object being positioned with llSetPos() can collide with anything. It's roughly equivalent to positioning the object while in edit mode, isn't it?
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
|
Raz Rutledge
Registered User
Join date: 13 Aug 2004
Posts: 12
|
11-21-2004 19:41
From: Cross Lament It's roughly equivalent to positioning the object while in edit mode, isn't it? I thought the same thing, but I can trigger the collision event by walking into the object.
|
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
|
11-21-2004 22:38
Well, true... but that's after the SetPos() function has done it's work, isn't it? I mean... if the object is in the process of being moved, can you bump into it? (a few minutes later... ) I just tried it online, and, while an object is being moved by llSetPos(), it does not collide with anything. Once it's at the position defined in llSetPos() for about a second, then my av could trip over it. 
_____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
|
Anu Statosky
Registered User
Join date: 15 Mar 2004
Posts: 20
|
02-24-2005 21:57
So has anyone figured out how to do this? I want to do the same thing but the only other option I have is to use llSensor to see if something is near by and I'd rather not do that every few seconds.
|
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
|
02-24-2005 23:20
Is physical movement or llVolumeDetect an option?
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
02-24-2005 23:40
I believe the function you're looking for is llMoveToTarget.And, to clarify all of the suggestions and conjecture flying around this thread: 1) llSetPos simply teleports an object from Point A to Point B within 10m, and does not check for anything to "collide with" along the way.
2) A collision event WILL be called should a physical object (like an avatar) "hit" your object... but not the other way around with llSetPos.
3) llVolumeDetect is a tad "clunky" in my experiences with it. I generally avoid using this function. I just attempted a simple call using it in-world and, well... failed to call a collision event. Also, isn't it only called when an object's center is within the link set?
4) The easiest solution, then, would be to use llMoveToTarget with Physics Enabled, as it would path smoothly and call collisions properly with a higher degree of accuracy.Hope that's readable. 
_____________________
---
|
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
|
02-25-2005 23:09
From: Jeffrey Gomez 3) llVolumeDetect is a tad "clunky" in my experiences with it. I generally avoid using this function. I just attempted a simple call using it in-world and, well... failed to call a collision event. Also, isn't it only called when an object's center is within the link set? The only problem I've had with llVolumeDetect() while running impromptu races has been a surplus of collisions generated. Are you setting the object to "phantom" before setting llVolumeDetect?
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
02-26-2005 13:50
From: Carnildo Greenacre The only problem I've had with llVolumeDetect() while running impromptu races has been a surplus of collisions generated. Are you setting the object to "phantom" before setting llVolumeDetect? Phantom before, eh? That might be it - I never fully worked out that nuance with it. Thanks.
_____________________
---
|
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
|
02-26-2005 22:47
From: Jeffrey Gomez Phantom before, eh? That might be it - I never fully worked out that nuance with it.
Thanks. Actually, what I've found works best is to leave the object non-phantom, and let setting llVolumeDetect take care of things. llVolumeDetect() seems to use a different sort of phantom than regular phantomness.
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
|
Trimda Hedges
Creator of Useless Prims
Join date: 19 Nov 2003
Posts: 247
|
02-27-2005 00:08
From: Jeffrey Gomez I believe the function you're looking for is llMoveToTarget.2) A collision event WILL be called should a physical object (like an avatar) "hit" your object... but not the other way around with llSetPos. 4) The easiest solution, then, would be to use llMoveToTarget with Physics Enabled, as it would path smoothly and call collisions properly with a higher degree of accuracy. [/b] Actually, Jeffrey has nailed it on the head. In order to register a collision, the colliding object must be physical. Ie: I have a 10x10x10 cube, its non-physical. Inside of one of its script is a collision event. In order for that to be triggered, the object colliding with it must be physical (ie AV, any physical object). If the speed of movement is not as important to you, then llMoveToTarget may be a viable option for you. As some of the other suggestions have indicated, Volume Detect is your other option.
_____________________
C. Create useless prims... Then delete... Rinse... Repeat.
"The problem is us, and the solution is within us all." -- Merwan Marker
"Trimda - do us both a favor and please put me on ignore." -- blaze Spinnaker
|