Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

CAMERA_POSITION_LOCKED Doesn't Do What I Think It Does?

Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
05-06-2007 06:54
heyas;

so all i want to do is set my camera to a particular position, then press a button on my hud and lock the camera in that position, and have it stay there until i unlock it (by pressing the button again).

so.... i write a little script that takes camera permissions, and uses CAMERA_POSITION_LOCKED, TRUE and CAMERA_POSITION_LOCKED, FALSE to lock and unlock the camera.

supposedly. because after i lock the camera, and start to move, the camera zips back to where it always goes when i'm walking around. not to mention, that after i set it locked, i can still use alt and alt-ctrl to move it around.

what definition of 'locked' is this thing using???


and... is there any way to achieve what i want to do? read the camera position and then set the camera position? :/
_____________________
Why Johnny Can't Rotate:
http://forums.secondlife.com/showthread.php?t=94705
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
05-06-2007 10:08
From: Bloodsong Termagant
heyas;

so all i want to do is set my camera to a particular position, then press a button on my hud and lock the camera in that position, and have it stay there until i unlock it (by pressing the button again).

so.... i write a little script that takes camera permissions, and uses CAMERA_POSITION_LOCKED, TRUE and CAMERA_POSITION_LOCKED, FALSE to lock and unlock the camera.

supposedly. because after i lock the camera, and start to move, the camera zips back to where it always goes when i'm walking around. not to mention, that after i set it locked, i can still use alt and alt-ctrl to move it around.

what definition of 'locked' is this thing using???


and... is there any way to achieve what i want to do? read the camera position and then set the camera position? :/


Welcome to the woes of changing camera settings.

as far as I've been able to tell, moving while setting a camera position with the target other than your own avatar will cause the camera to reset. This is the reason why you will not find an R/C vehicle with a follow camera; it's just not possible with the (poorly IMO) way camera settings have been implemented.

[edit]
you can have a mildly useful setting if you repeatedly call the camera setting in a fast timer loop, but it will jerk around often as the camera tries to snap back to the avatar and then back to the position you want. There also appears to be some distance limits on how far away from your avatar the camera can be before it hits some kind of wall. my testing has it estimated at about 10m distance. Once again, poor scripting implementation with severe limits compared to being able to do the same thing with the unbound camera everyone uses.

[edit2]
If there's been some implemented setting where you turn off camera snapping to your avatar on movement keys being pressed (even after you've taken control via script), let me know, as this would allow for a huge host of opportunities for R/C cars
_____________________
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.
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
05-07-2007 07:40
ugh.

but... what if my target IS the avatar? because, basically what i want to do is like the follow cams, but instead of scripting the location/distance/angle into it, i want to set the camera by hand (for whatever height/angle/etc is convenient at the time/place), and then lock it there so it follows me from that position.

will that work?
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
05-07-2007 10:08
I've personally never tried to use the camera settings to follow my own avatar, only other avatars/objects so I do not know if the snapping back rule applies in that case, but it sounds like it does from what you're posting. My best understanding is that movement keys reset the camera. The only time I've not found this to be true is when you use the llSetCameraEyeOffSet and llSetCameraAtOffset prim properties like you would in a vehicle. Someone please feel free to correct me if I'm wrong though.
_____________________
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.
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
05-08-2007 08:20
okay;

i guess its back to the linden follow cams script. because i KNOW you can make a different camera angle and keep it while you move. like worm cam and top cam and such.

i'm also going to guess that camera locked doesnt do it, and i need to do a camera params read, then a write to get it to stick. ick.