• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
MAINTENANCE ANNOUNCEMENT - JIRA will undergo maintenance starting 1:00am PDT through 3:00am on Saturday 2010.03.20. Please do not enter issues during this time as the system maybe restarted.
Issue Details (XML | Word | Printable)

Key: SVC-900
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Unassigned
Reporter: Gigs Taggart
Votes: 9
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

llRayCollide from LSL

Created: 29/Oct/07 03:53 PM   Updated: 16/Feb/10 02:39 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Issue Links:
Relates


 Description  « Hide
New LSL feature, ray picking:

list llRayCollide(vector pos, vector dir, float maxdist, string name, key id);

Position = starting position in world coords
Dir = unit vector relative to the position to indicate the direction to shoot the ray

Last two params are optional

name = name of object to collide with (similar to collisionfilter), can be "" for any name.
id = id of object to collide with, can be NULL_KEY for any.

Returns:

[pos, name, key]

pos = position of first ray intersection (NOT the center of the prim that the ray collided with)
name = name of prim that the ray collided with
key = key of prim that the ray collided with



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Gigs Taggart added a comment - 29/Oct/07 06:37 PM
Oh, for the less technically oriented, this would be good for about a million things. Here's a few off the top of my head:

1. Combat systems that don't have to shoot physical bullets.
2. Pets that don't have to send out physical probes to avoid colliding with walls
3. Prim->sculptie generator tools that don't have to rely on a swarm of 1024 physical bullets to figure out the shape of an object.


Lex Neva added a comment - 30/Oct/07 10:50 AM
Wouldn't this require a heck of a lot of processing on LL's servers? Wouldn't they essentially have to check the ray against every object in the sim, and sort by nearness? I can think of a few optimizations, but the worst case could still be nasty.

Gigs Taggart added a comment - 30/Oct/07 12:20 PM
It's not as expensive as you think. It's used all the time as it is, for things like rezzing objects. Havok4 makes it even cheaper.

Moy Loon added a comment - 01/Aug/08 05:03 AM
This would be an awesome addition to SL, could be useful in pretty much everything, and rays are pretty cheap, since there used for camera/rezzing things as you said, If there is some sort of resource problem, they can just have a delay, it would still be much faster/accurate then having to rez an object.

cracker hax added a comment - 22/Aug/08 08:08 AM
This would also be useful for UI stuff, if you could cast a ray from UI coordinates (using the new touch features for a UI overlay perhaps?).

Jack Abraham added a comment - 16/Feb/10 02:18 PM - edited
Andrew Linden mentioned in his office hours (http://wiki.secondlife.com/wiki/User:Andrew_Linden/Office_Hours/2010_02_12) that Falcon Linden would like to see this implemented. Not sure how to draw their attention here since I can't attend office hours myself.