|
Varun Blitz
Registered User
Join date: 22 May 2008
Posts: 62
|
07-04-2008 01:30
i wanted to change the camera position from HUD or any other attachment so i started trying with simple script but even that is not working. default { attach(key id) { if(id!=NULL_KEY) llRequestPermissions(llGetOwner(),PERMISSION_TRACK_CAMERA|PERMISSION_CONTROL_CAMERA); } run_time_permissions(integer perm) { llSetTimerEvent(15); } touch_start(integer total_number) { llSetTimerEvent(0); } timer() { llSetCameraParams([CAMERA_ACTIVE,TRUE,CAMERA_POSITION,<50.650,223.271,29.921>,CAMERA_FOCUS,<50.650,223.271,25.921>,CAMERA_FOCUS_LOCKED,CAMERA_POSITION_LOCKED]); llOwnerSay((string)llGetCameraPos()+" after reposition"  ; llSleep(3); llClearCameraParams(); llOwnerSay((string)llGetCameraPos()+" again"  ; } } i have hard coded the position into the object itself but even then it takes to me to some arbitrary coordinate nearby the position. do attachment follow some other coordinates for positioning camera. i thought region coordinates shud work well, but there seems to be some other problem. help plz.........
|
|
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
|
07-04-2008 02:14
From: someone llSetCameraParams([CAMERA_ACTIVE,TRUE,CAMERA_POSITION,<50.650,223.271,29.921>,CAMERA_FOCUS,<50.650,223.271,25.921>,CAMERA_FOCUS_LOCKED,CAMERA_POSITION_LOCKED]); I think you'll find you've got it right except for one thing: the usage of CAMERA_POSITION_LOCKED and CAMERA_FOCUS_LOCKED Try this: llSetCameraParams([CAMERA_ACTIVE,TRUE,CAMERA_POSITION,<50.650,223.271,29.921>,CAMERA_FOCUS,<50.650,223.271,25.921>,CAMERA_FOCUS_LOCKED, TRUE, CAMERA_POSITION_LOCKED, TRUE]);
|
|
Varun Blitz
Registered User
Join date: 22 May 2008
Posts: 62
|
07-04-2008 03:08
yeah, thanx buddy !! how silly of me to do that, i shud have copied it from the other script i wrote. i messed the parameters.
|