Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Quick way to rotate to looking at owner?

Graham Mondrian
Registered User
Join date: 16 Mar 2005
Posts: 59
04-10-2005 21:11
Sorry if this is obvious guys but i glazed the API and a way doesnt come to mind to easily make something look at its owner. I got the owners position through the sensor event but im not sure what to do with it.

ty,

Graham.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-10-2005 21:32
http://secondlife.com/badgeo/wakka.php?wakka=llRotLookAt
http://secondlife.com/badgeo/wakka.php?wakka=llLookAt
_____________________
---
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
04-10-2005 23:15
If your gadget is nonphysical, llRotLookAt() will not work. However:

/15/d4/10923/1.html

The getRotToAgent() function will give you a rotation that will cause your object to "look" at an object at a given position, assuming you built it so that the X-axis faces forward on the object.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-11-2005 07:44
From: Huns Valen
If your gadget is nonphysical, llRotLookAt() will not work.

I would check that if I were you, Huns. I have several non-physical objects that use llRotLookAt just fine. :)

Edit #2: Corrected posts for right commands. llLookAt was what I wanted for the original reference.
_____________________
---
Graham Mondrian
Registered User
Join date: 16 Mar 2005
Posts: 59
04-12-2005 06:55
From: Jeffrey Gomez
llLookAt was what I wanted for the original reference.

Ty, I tried it after you posted it originally and it seems to do the job.
DNA Prototype
Mad Scientist
Join date: 8 Aug 2004
Posts: 179
04-12-2005 11:44
llRotLookAt will work with non physical objects.

DNA
_____________________
DNA DEMENTED CIRCUITRY LIGHTING AND DJ SUPPY
SL's finest speakers, DJ gear, lasers, killer club lighting & effects.
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
04-14-2005 02:05
either I did something wrong or it didn't a year ago :/