|
Dudeney Ge
EduNation Archipelago
Join date: 21 Jul 2006
Posts: 95
|
08-22-2006 04:14
Hi,
What I'm trying to achieve is this:
1) Person is in one room, but I don't know exactly where, or which way s/he is facing 2) Person is offered a menu of three cams to view in a room next door 3) Camera switches to a defined position in the next room
The menu system is working, and calling SetCameraParams fine each time.
My question is, can one just set a region-relative position (i.e. in the middle of the next door room, facing a big screen) without it being an offset of the person's current position or not - simply by telling the camera to look from a certain set of coordinates in a certain direction? If so, any pointers, please?
If not, I'm assuming one has to get the person's current camera position and rotation, then calculate the offset movement and rotation necessary to move their camera to the new position? Again, if that's the case, any pointers as to how that might be scripted?
Thanks in advance for any help you can provide.
DG
|
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
08-22-2006 06:24
I'm not sure that you can do those two things. But can't you ask people to sit on something when they offer the menu?
_____________________
 Seagel Neville 
|
|
Dudeney Ge
EduNation Archipelago
Join date: 21 Jul 2006
Posts: 95
|
HUD Camera Control
08-22-2006 06:31
Hi,
And thanks for taking the time to respond.
The menu system is in a HUD, so there are no problems with permissions (as far as I can see - since the item is worn).
I have seen this done, but the movement has always been relative to the avatar's current position (i.e.making a choice moves the camera 2 metres to the left of the avatar's current position and swings it round so it's looking at the side of the avatar). What I want to do is send the camera to a fixed position in another room.
DG
|
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
08-22-2006 06:41
Oh, then the HUD can know the Avatar's positon and rotation by llGetPos and llGetRot. But the calculation seems to be difficult. Aha, and do you want the camera to be fixed while people are moving? hmm... sorry, I have no idea... 
_____________________
 Seagel Neville 
|
|
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
|
08-22-2006 06:45
Take a look at the wiki for llSetCameraParams You can set the camera position and focus position to be the places you want in the other room. Set them and lock them and you have what you need. Just remember to build in an "unlock" camera button - It gets mighty frustrating hammering on the esc key trying to get your camera back when something has gone wrong. ( I make the CaliCam in fact - plug, plug - and there is a room viewer in the CaliCam box that does exactly what you described  )
|
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
08-22-2006 06:50
It was a good advice. I also leaned it. Thanks.
_____________________
 Seagel Neville 
|
|
Dudeney Ge
EduNation Archipelago
Join date: 21 Jul 2006
Posts: 95
|
More information...
08-22-2006 06:56
Adriana, Thanks for this. In fact I have used the CaliCam (bought it) and found it to be very good. What I need and am atempting to build is a small HUD for groups of people attending free seminars in a large room to get different views of the room, close up on a screen, etc. (and yes, it does have a camera off button - thanks for the reminder, though!). So, they are wearing the HUD, they have given permission for their camera to be controlled, and have chosen Seminar Camera 1. For that choice I have: semcam1() { llOwnerSay("Seminar Room Camera 1 "  ; llClearCameraParams(); llSetCameraParams([ CAMERA_ACTIVE, 1, CAMERA_BEHINDNESS_ANGLE, 0.0, CAMERA_BEHINDNESS_LAG, 0.0, CAMERA_DISTANCE, 0.0, / CAMERA_FOCUS, <11.000,125.000,40.000>, CAMERA_FOCUS_LAG, 0.0 , CAMERA_FOCUS_LOCKED, FALSE, CAMERA_FOCUS_THRESHOLD, 0.0, CAMERA_PITCH, 0.0, CAMERA_POSITION, <15.000,125.000,40.000>, CAMERA_POSITION_LAG, 0.0, CAMERA_POSITION_LOCKED, FALSE, CAMERA_POSITION_THRESHOLD, 0.0, CAMERA_FOCUS_OFFSET, <0,0,0> ]); } Camera doesn't seem to move much, really (tried various combinations).. Not sure where to go from here. Any help much appreciated. Thanks in advance DG
|
|
Dudeney Ge
EduNation Archipelago
Join date: 21 Jul 2006
Posts: 95
|
Solved
08-22-2006 07:04
Adriana,
My mistake - I didn't lock the camera position or focus - and now it is working. You're a star - thanks so much for your help!
DG
|