Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Wall Detection?

Ansi Belvedere
Second Life Resident
Join date: 17 Oct 2004
Posts: 23
10-28-2004 14:21
Does anyone know of a script which does wall detection? That is, without slamming into the wall?

-Ansi
Nick Fortune
National Alchemist
Join date: 30 May 2003
Posts: 74
10-28-2004 15:09
You could use llVolumeDetect perhapps? Maybe if you explain exactly what you are trying to do you'd get more of a response?
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
10-28-2004 17:10
[deity] it'd be so nice to be able to detect where walls are without having to use volume detect. Or if we have to use volume detect, to be able to tell WHERE THE HELL THE WALL IS! If I turn on volume detect for a sphere, and it bumps into the corner of a 10x10x10 prim, it thinks that the thing it bumped into is 10+ meters away. Relatively annoying, to say the least. It's why we need a function to retrieve the point of collision.
Xylor Baysklef
Scripting Addict
Join date: 4 May 2003
Posts: 109
10-28-2004 17:36
Yeah, we need better tools for this sort of thing. The new llGetBoundingBox might be useful for low-level avoidance algorithms, but it is still too coarse for detailed work.

Xylor
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-28-2004 20:53
I've found it (llGetBoundingBox) very usefull in finding out the exact size of my evil prim's bounding box's :D

An interesting function might be
integer llPossibleCollision(vector local)
but it seems a little too basic to be truely useful.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
10-29-2004 08:27
Hmmm... How about a llSensorVolume command that you give a point and a radius for a spherical volume, or two points to create a cube (opposite corners). This way you can control the shape and origin of the region. Then add a new flag to all llSensor scans, COLLISION, to see if there is ANYTHING in that volume. It would return 1 or 0 with NULLS from all "detected" functions in the sensor handler. That should make this type of sensor very fast, as it will stop scanning when it finds the first object or section of landscape in the given region. (Object the script is in would not be counted.)

With this, you could throw a small sensor volume out in front of a moving object to detect impending collisions with objects or cliff walls.
_____________________
~ Tiger Crossing
~ (Nonsanity)
Ansi Belvedere
Second Life Resident
Join date: 17 Oct 2004
Posts: 23
10-29-2004 09:38
Thanks, I'll have to try all these solutions and see which works best.

-Ansi
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-30-2004 15:24
I fully support Tigers suggestion.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey