Jump to content

llTeleportAgent lookat help


Ichi Rexen
 Share

You are about to reply to a thread that has been inactive for 2304 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi there. So, i have been playing around with experiences and i am currently playing around with the llTeleportAgent function. I have used this function many times before but have never been able to properly figure out how you are supposed to set the lookat correctly. I have tried everything from the rotation of the avatar to seeing if it is similar to the lookat on llSitTarget i.e <0,0,270> and yet NOTHING that i try seems to be working. Could someone who is knowledgable on this subject please, very kindly, take the time to explain :

 

1. How the lookat works exactly (i.e what kind of angle its looking for etc)

2. How you are supposed to figure out what values to put to face a certain direction (because honestly, im stumped)

 

If someone would take the time to do this i would be so thankful :)

 

Also, i have already read through the wiki. It was not particularly helpful in helping me understand this section of the function.

Link to comment
Share on other sites

In theory, the answer is simple. That final parameter is asking for a regional vector -- the global position for your avatar to look toward when it arrives. So, if you specify <256.0,256.0,0.0>, you should land facing the NE corner of the region. There are several JIRA reports suggesting that people have had trouble making it work, but I have used it successfully myself.  Unfortunately, that parameter does not work if I use llTeleportAgentGlobalCoords.

Link to comment
Share on other sites

So....if <256,256,0> is facing NE do you just alter the X and Y values of the vector to achieve the other directions?. Idk why they couldnt just allow you to get the rotation of a object thats facing the way you want to face when you land and use that. So, i may be wrong in understanding this, but if i set to 128,128,0 then i should be facing SW?

Link to comment
Share on other sites

So, 256,256,0 does NE where as 128,128,0 does NW yet 192,192,0 does not face north which i would have thought it would do as 192 is halfway between 128 and 256. 192 faces (at a visual guess from minimap) about 10 degree NW of North...

Link to comment
Share on other sites

It depends on where you are.  I should have been clearer.  If you specify <256.0,256.0,0.0>, you will end up looking at the position <256.0,256.0,0.0>, which is the NE corner of the region.  If you are in the center of the region, that means you will actually be looking northeast.  However, if you happen to be in the SE corner of the region, at <256.0,0.0,0.0>, you will still be looking at the NE corner, but that will be due north of your current position.   That is, you will be looking north from where you are. The parameter is not asking for a direction.  It's asking for a position to look at.  Does that make sense?

EDIT: This is actually a very handy way for LL to have designed it.  If you want to land looking at your front door, for example, you don't have to calculate the direction from your landing point.  All you have to know is where your front door is.  Put its regional position into that parameter and you'll look at it.

Link to comment
Share on other sites

Ahhhhhhhh ok i get you. Why on earth doesn't it just say that on the wiki instead of this

 

"look_at is not the coordinates of a point in the region. The look_at vector is <llCos(facing), llSin(facing), 0.0> where facing is the angle towards which the arriving avatar is to look."

 

The above confused me a little as i was like "yes thats all well and good but how do you set theses values and what specifically to..."

 

Thank you for taking the time to clear that up for me, i greatly appreciate it.

Link to comment
Share on other sites

Oh, my.  Yes, I see it there.  That's interesting.  As I commented earlier, the look_at vector doesn't seem to work in llTeleportAgentGlobalCoords at all. Maybe that's why.  Something is messed up in the way that function interprets the parameter? 

In any case, look_at in llTeleportAgent really is a position.  I've been using it that way successfully for more than a year.

Link to comment
Share on other sites


Rolig Loon wrote:

Oh, my.  Yes, I see it there.  That's interesting.  As I commented earlier, the look_at vector doesn't seem to work in
llTeleportAgentGlobalCoords
at all. Maybe that's why.  Something is messed up in the way that function interprets the parameter? 

In any case, look_at in
llTeleportAgent
really is a position.  I've been using it that way successfully for more than a year.

Tracking through the history of wiki edits for llTeleportAgentGlobalCoords, it loops back to a comment I made to a jira issue describing how I use the look_at vector in my inter-sim walk-thru telepads, which code uses different calculations for inter-sim and intra-sim calls of that -GlobalCoords function. A subsequent jira comment notes that it also behaves differently when the script is in an attachment, compared to freestanding (as in my telepads).

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2304 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...