Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

set camera problem

LostInKgp Kanik
Registered User
Join date: 23 May 2008
Posts: 10
07-03-2008 23:42
I have problems in setting up camera at a particular position. I have attached an object as HUD with Avtar and another object is kept on ground. Attached object has position of object which is kept on ground. so, When i try to set camera at that object then camera is not setting up on object. It goes somewhere else. Script for attached object is as follows :
-------------------------------------------
vector pos=<77.068,77.023,24.583>; //position of object which is on ground
default
{
touch_start(integer total_number)
{
llRequestPermissions(llGetOwner(),PERMISSION_CONTROL_CAMERA);
llOwnerSay("Touched";);
llSetCameraParams([CAMERA_ACTIVE,TRUE, CAMERA_POSITION, pos+<0,0,4>,CAMERA_FOCUS, pos,CAMERA_POSITION_LOCKED,CAMERA_FOCUS_LOCKED]);
llSleep(5);
llClearCameraParams();
}
}
-----------------------------------------------------

And when i replace "pos" with llGetPos(), camera sets on Avtar correctly.
-----------------------------------------------------
llSetCameraParams([CAMERA_ACTIVE,TRUE, CAMERA_POSITION, llGetPos()+<0,0,4>,CAMERA_FOCUS, llGetPos(),CAMERA_POSITION_LOCKED,CAMERA_FOCUS_LOCKED]);
-----------------------------------------------------

Plz reply...
thanx in adv.
LostInKgp Kanik
Registered User
Join date: 23 May 2008
Posts: 10
07-04-2008 03:02
problem solved...
actually some parameters were missing frm llsetcamerparams function :P