Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

how to control camera from HUD

LostInKgp Auerbach
Registered User
Join date: 3 Jun 2008
Posts: 4
07-03-2008 04:29
can neone xplain me how to control the camera from HUD.
what i actually want is that i have different buttons on HUD which take me to different locations by shifting the camera(position and focus).
for this do i need to ask the permission for camera control from the HUD base(on which buttons are attached) or the buttons individually.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
07-03-2008 06:10
If it is a linked object you don't need any scripts in your buttons and consequently you only need a permission from the root.
Neone was out, I hope my help will do :)
_____________________
From Studio Dora
Erluen Twin
Registered User
Join date: 26 May 2006
Posts: 23
moving camer positions from HUD
11-21-2008 03:08
I want to do the same thing but I dont know how.
I tried..
on touch
{ llSet Camera Offset bla blah}
(with proper code of course)
but it does absolutely nothing.

So.. how?
Domchi Underwood
Registered User
Join date: 4 Aug 2007
Posts: 44
11-21-2008 15:00
You have to get permission to control the camera:

llRequestPermissions(llGetOwner(), PERMISSION_CONTROL_CAMERA);

After getting the permissions (run_time_permissions event gets triggered), the minimum you have to do is (target and pos are vectors):

llSetCameraParams([
CAMERA_ACTIVE, 1,
CAMERA_FOCUS, target,
CAMERA_FOCUS_LOCKED, TRUE,
CAMERA_POSITION, pos,
CAMERA_POSITION_LOCKED, TRUE
]);

And afterwards, to reset camera:

llSetCameraParams([
CAMERA_ACTIVE, 0
]);