Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Camera Troubles

Valradica Vanek
Registered User
Join date: 1 Aug 2006
Posts: 78
09-16-2008 06:39
I am trying to make the camera look at a certain point from a certain point and be able to change both of them from the script. I have read and re-read the camera controls and I know my math is right for selecting the points. Using the llSetCameraParams call, I set these values and have several issues:

1) if I set the Camera loacation to be 3 meters above the center of the prim that I am sitting on, but no matter what I do, it is always 2-3 meters behind me.

2) I set the camera target to be the center of a nearby prim (by touching the prim and having it deliver the locations via llGetPos()) but the camera never really points at the prim. It just moves a little bit in that direction. From reading the wiki, it seems that the camera should be pointing direclty at its target - is this not true?

3) Subsequent camera calls do nothing unless I turn the camera off and then back on again with sequential commands. While this works, there is nothing in the documentation that indicate that it should be this way.

4) Is there anyway from a script to disable the User Invoked camera (turn it off, for example) I have tried everything, but if the user has Alt-clicked, the camera seems inaccesible. In the product I am working on, I want the user to Alt click, but in certain circumstances I want to force the focus of the user on certain things (e.g. a powerpoint presentation on a screen).

I have been scripting for two years steady in SL (i.e. I'n not a newbie to scripting), but nothing about the camera seems to work as described in the wiki. Are there any good documentaions on this that describe how it really works?
Cynebald Ceawlin
Scripting the night away
Join date: 15 Apr 2007
Posts: 30
09-16-2008 09:29
Hi Valradica -- I too have recently been fighting w/ the scripted camera controls. Unfortunately I don't have anything in the way of help for you. I've had some success w/ getting the camera to be positioned/pointed the way I wanted it to be, but it took a fair bit of playing around w/ it.

I *don't* think there is any good way to get around the alt-click thing. I spend several hours the other night doing battle with that particular bit of functionality for a mulit-sit script I'm working on. It grabs the controls and uses shift-left/shift-right to change the currently playing anim. Works great, but if the user has moved their camera at all every time they change pose the camera moves back to the default position. Very irritating, so I was trying to make it leave the camera alone but couldn't find any way to do so.

If anybody else has any advice on these topics, it would be most welcome! Maybe somebody should put together a JIRA feature request asking for more camera controls? I don't have a clear enough picture in my head of what I would want to see, but maybe somebody who's put some thought into it does...

-- Cyn
_____________________
-----
Cynebald Ceawlin
Proprietor and Chief Scripter
The Mathom House:: Scripted Objects and What-Not
Nimue Isle (SLURL: http://slurl.com/secondlife/Nimue%20Isle/164/119/28)