Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Look at me!

Nenilai Valentine
Registered User
Join date: 19 Feb 2006
Posts: 7
05-22-2007 07:09
Hey trying to make a simple script that allows an object to look in the direction of the person who clicked it, but ONLY in their direction, not by height, not up or down.


Basically if I was flying and I clicked on it, it would just look in the direction I am in but not up.

Anyone out there hard core enough to make something like that?
Sys Slade
Registered User
Join date: 15 Feb 2007
Posts: 626
05-22-2007 08:18
From: Nenilai Valentine
Hey trying to make a simple script......
Anyone out there hard core enough to make something like that?

So you're actually looking for someone to do it for you.
Try "products wanted".
_____________________
Send me the last 4 digits of a valid SSN, I'll verify you are who you say you are, even if you aren't.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
05-22-2007 08:22
Find the vector to the target in Euler format, remove the vertical component (set vec.z to zero), and convert back to rotation.
Nenilai Valentine
Registered User
Join date: 19 Feb 2006
Posts: 7
05-22-2007 09:29
Well thank you but nm, I was just working at it a bit more and figured it out, not sure how to close this thread but I found out the answer.
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
05-22-2007 10:10
Oops, my answer was wrong: llLookAt takes a postion, not rotation (doh). So you just set the target's z coordinate to your object's.