Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

collision_start/end

Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
11-05-2008 15:20
Weird things happening (at least for me :)

I have a moving sphere with a «detector» prim (shaped like a stick) attached. I'm using llVolumeDetect to detect collisions with other objects and avatars.

When the «stick» collides with another object, the collision_start()-event is triggered. Then I stop the movement and turn the sphere around the z-axis, making the stick point into another direction.
I would expect, that as soon as the stick doesn't collide with the object anymore, the collision_end()-event would be raised - which isn't the case though...

Any ideas?
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
11-05-2008 15:50
With llVolumeDetect, to trigger collision_end an object has to move physically out of the prim. Consider an avatar standing inside it. If the avatar teleports away or sits on something to get out, it doesn't trigger collision_end. An object becoming non-physical and then changing rotation or position causes the same thing. You could check whether the object is still within sensor range, or whether it has disappeared, or check whether their bounding boxes intersect.
_____________________