|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
01-11-2007 22:28
Quick question guys, hope someone can help out.
I've got a prim that is moving along a predefined path. I also have another prim that will be the "rotational target". Idea is simple, as the prim moves along the path, it will automatically rotate to orient the target position.
There is an avatar sitting on the moving prim, the idea is to keep the avatar rotated towards the target prim no matter what.
What are some recommendations?
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
01-12-2007 02:53
Try llLookAt or llRotlookAt
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
01-12-2007 08:26
Hey again. I'm doing this: vector focus_target_pos = <100,100,10>;
llRotLookAt(focus_target_pos, 1.0, 1.0);
But I'm getting a compile error: ERROR : Function call mismatches type or number of arguments
The wiki says's there's only 3 parameters for this, a vector and 2 floats. What am I doing wrong?
|
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
01-12-2007 08:45
The first argument is not a vector. It is a rotation. Not the same thing at all. Welcome to quaternion hell 
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
01-12-2007 08:56
Yeah you were right about the rotation. I switched back to llLookAt.
So, I'm feeding the vector position of where my target is <100,100,10> but as the prim is moving its not rotating towards the target position.
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
01-12-2007 10:17
Ok, maybe I'm doing something wrong, however I believe there is a problem with the wiki.
The wiki for llLookAt() says "This function works for both physical and non-physical objects."
I could not get my moving prim to rotate until I set physics to TRUE.
|
|
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
|
01-13-2007 04:16
I've had non-physical prims rotate using llLookAt and one thing I noticed was that you cannot have the prim selected when the function is executed, for some reason that overrides the rotation. Could just be me though, took a long time to figure out why the prim wasn't rotating. Also check your strength and damping values, I haven't used anything other than the recommended ones on a non-physical. I don't know if or how these values would affect a non-physical rotation. From: someone For non-physical objects, good strength values are around half the mass of the object and good damping values are less than 1/10th of the strength.
_____________________
www.nandnerd.info http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
|