10-12-2006 11:32
Quite honestly, I have no clue how to properly use the llSetCameraParams() function, and the example script is just too robust/complex for me to learn from. Essentially what I want to do is have an object broadcast it's coordinates, and then an attachment force the camera to look at those said coordinates. The code I have for that is

Broadcasting script:
CODE

default
{
state_entry()
{
llSetTImerEvent(2);
}

timer()
{
llShout(-12335,(string)llGetPos());
}
}


Camera attachment script:
CODE

default
{
state_entry()
{
llRequestPermissions(llGetOwner,PERMISSION_CONTROL_CAMERA);
llListen(-12335,"",NULL_KEY,"");
}
listen(integer channel, string name, key id, string message )//When the coordinates are heard, set the camera
{
llSetCameraParams([CAMERA_ACTIVE, TRUE, CAMERA_FOCUS, (vector)message]);
}
}


It "Works" for about 3 broadcasts of the object's position (object is moving in a set path), and then the camera decides to focus off at some random point outside the sim which is nowhere near the object.

Also, I'm not sure how to release the camera control, as once this occurs the only way to get back to a normal camera view is to log-out and log back on. But this is only because I don't know how to return the camera to "normal"
_____________________
My SLExchange shop

Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not.


The function is working perfectly fine. It's just not working the way you wanted it to work.