Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Obtain camera lock-on position with llGetCameraAt

Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
10-05-2005 22:59
We've got llGetCameraPos and llGetCameraRot coming up in SL 1.7. These will allow scripts to obtain an agent's camera location and rotation (granted permission from said agent), information which was previously unavailable for scripters to make use of. I think this is great, and I look forward to seeing these functions put to new and exciting uses.

But I'm also wondering: what about something like llGetCameraAt, so we can obtain the camera lock-on point? You know, the point you rotate your view around by clicking & alt-dragging the mouse? We know this data already gets transmitted, since it's the point your avatar's head turns toward when you're locked onto an object. So why not give us access to it?

Example: Suppose an avatar designer is making a prim head. They're designing it with texture-based eyes whose pupils can move back and forth, up and down. They'd like the texture eyes to adjust based on the location that the user is looking at, which is exactly what the default human avatar's eyeballs do. However, the available functions only let them know the position and rotation of the user's camera -- while they can use these to determine the user's line of sight and the origin of this line of sight, they cannot determine what point along this line of sight the user is actually looking at. Since the user's avatar is in a different position than the user's camera (except in mouselook), the avatar has a different "line of sight" than the camera, so the camera's position and rotation are of no use to it from its point of view. Thus, the texture eyes simply cannot be made to function like the default av eyes unless a function like llGetCameraAt is implemented.

Comments welcome!
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
10-06-2005 00:25
Approved. Would make it much easier than the workarounds.
_____________________
---
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
10-06-2005 21:31
From: Jeffrey Gomez
Would make it much easier than the workarounds.

Actually, there wouldn't even be any point in trying to use the workaround. Since it only works for mouselook, it would achieve the same result as using llGetCameraPos and llGetCameraRot in mouselook (only with less accuracy). :p
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
10-06-2005 22:52
Proposal is now up:
Prop 644 - Obtain camera lock-on position with llGetCameraAt

EDIT: This proposal has been abandoned. See below for the new one.
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-06-2005 23:05
I suggest naming it
llGetCameraTarget
more descriptive

since this information is already available via the debug menu it shouldn't be a problem adding it.
_____________________
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
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
10-06-2005 23:26
From: Strife Onizuka
I suggest naming it
llGetCameraTarget
more descriptive

I had considered that. But since we already have llLookAt and llSetCameraAtOffset (both of which involve something "looking at" something else), and since "target" tends to have more of a connotation of "a reference point to move toward" in many LSL functions, I figured llGetCameraAt would be more consistent and less confusing given the existing LSL conventions.

But hey, I'm just attached to the concept, not the name. LL could call it llWhatULookinAtFoo, for all I care. :D
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-08-2005 04:12
Saw the hotline post,
Just to clarify what i said the feature that shows a beacon for each users camera origin can be accessed by first enabling
Debug -> Character -> Show Look At
then enabling
Debug -> Character -> Show Point At

The blue beacon shows the direction the av is looking
The grey beacon shows the av isn't looking anywhere in paticular
The pink beacon marks the location the av is looking at it

normaly the pink shows the location of the origin for the camera, but with Camera Controls this position isn't updated (though the av continues to look at that location; this i consider a feature and not a bug).
_____________________
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
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
10-08-2005 11:42
Thanks for the info, Strife. Actually, it appears that the relevant option here is just "Show Look At", since "Show Point At" only seems to highlight the point that your "dot stream" flows toward when you select an object with right-click.

I've edited my Hotline post accordingly, as well as to clarify my intended purpose for the function.
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
10-08-2005 12:55
After some consideration, I abandoned my previous proposal and wrote up a new one that speaks more in terms of what the avatar is looking at, rather than what the camera is locked onto:
Prop 648 - Obtain avatar's look-at point with llGetLookAt
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-08-2005 19:38
I'm very sorry about that, i distinctly remembered it showing other users camera position information in the past.
_____________________
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