1st-person view
|
|
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
|
03-16-2006 12:36
I'm trying to get the new camera controls to make a 1st-person view cam but the 3D pane keeps freezing for a bit whenever I try--and I can't get the damn thing to go any higher. llSetCameraParams([ CAMERA_ACTIVE,1, // 1 is active, 0 is inactive CAMERA_BEHINDNESS_ANGLE,0.0, // (0.0 to 180.0) degrees CAMERA_BEHINDNESS_LAG,0.0, // (0.0 to 3.0) seconds CAMERA_DISTANCE,0.0, // ( 0.5 to 10) meters CAMERA_FOCUS,llGetPos(), // region-relative position CAMERA_FOCUS_LAG,0.0, // (0.0 to 3.0) seconds CAMERA_FOCUS_LOCKED,0, // (TRUE or FALSE) CAMERA_FOCUS_OFFSET,<0,0,0>, // <-10,-10,-10> to <10,10,10> meters CAMERA_FOCUS_THRESHOLD,0.0, // (0.0 to 4.0) meters CAMERA_PITCH,0.0, // (-45.0 to 80.0) degrees CAMERA_POSITION,llGetPos()+llRot2Up(llGetRot()), // region-relative position CAMERA_POSITION_LAG,0.0, // (0.0 to 3.0) seconds CAMERA_POSITION_LOCKED,0, // (TRUE or FALSE) CAMERA_POSITION_THRESHOLD,0.0 // (0.0 to 4.0) meters ]);
|
|
Kurshie Muromachi
Primtastic!
Join date: 24 Apr 2005
Posts: 278
|
03-16-2006 12:56
Ok, give this a try. If it offsets incorrectly then swap the "1" in the offset vector or create a formula to determine that for ya. I just used direct values here and all looks good. This will view from the 1st persons eyes kind of like mouselook does assuming that's what you mean by 1st person view. camera() { llSetCameraParams([ CAMERA_ACTIVE, TRUE, CAMERA_POSITION, llGetPos(), CAMERA_DISTANCE, 0.0, CAMERA_POSITION_LAG, 0.0, CAMERA_POSITION_THRESHOLD, 0.0, CAMERA_BEHINDNESS_ANGLE, 0.0, CAMERA_BEHINDNESS_LAG, 0.0, CAMERA_FOCUS_LAG, 0.0, CAMERA_FOCUS_THRESHOLD, 0.0, CAMERA_FOCUS_OFFSET, <1,0,1> ]); }
default { attach(key id) { if (id != NULL_KEY) { llRequestPermissions(id, PERMISSION_CONTROL_CAMERA); } } run_time_permissions(integer perm) { if ((perm & PERMISSION_CONTROL_CAMERA) == PERMISSION_CONTROL_CAMERA) { camera(); } } }
|
|
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
|
03-16-2006 13:35
Thanks. That works decently but SL really needs a proper 1st-person view that works exactly like 3rd-person view. :/ Come on, LL...why go to the bother of adding all these new cam functions if you don't even implement a proper 1st-person view?
|
|
Zodiakos Absolute
With a a dash of lemon.
Join date: 6 Jun 2005
Posts: 282
|
03-16-2006 14:34
That is pretty awesome guys.  Thanks!
|
|
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
|
Eep
03-16-2006 14:37
Eep, the standard first-person view is more "immersive" for not providing access to the UI.  I tried the script. It's neato. Thx! I modified the script to enable / disable cam control on touch, but llReleaseCam() doesnt seem to return cam control to me. Im using: llReleaseCamera(llDetectedOwner(0)); but cam control isnt returned. Any tips?
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
|
|
Kurshie Muromachi
Primtastic!
Join date: 24 Apr 2005
Posts: 278
|
03-16-2006 16:11
From: paulie Femto I modified the script to enable / disable cam control on touch, but llReleaseCam() doesnt seem to return cam control to me. Im using: llReleaseCamera(llDetectedOwner(0)); but cam control isnt returned.
Any tips? To release control of the new FollowCam feature you use the following: llSetCameraParams([CAMERA_ACTIVE, FALSE]); Hopefully that is what you were refering to. 
|
|
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
|
03-16-2006 19:28
From: paulie Femto Eep, the standard first-person view is more "immersive" for not providing access to the UI.  No, more immersion means being able to DO more in a view. There's no reason why everything in 3rd-person view can't be doable in 1st-person.
|
|
Kairen Overdrive
Registered User
Join date: 12 Jul 2005
Posts: 38
|
03-16-2006 23:27
From: Kurshie Muromachi To release control of the new FollowCam feature you use the following: llSetCameraParams([CAMERA_ACTIVE, FALSE]); Hopefully that is what you were refering to.  llClearCameraParams(); This one might as well be easier to write.  Use this to release the camera completely. Use kurshies method to just switch it off.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
03-17-2006 02:50
ll screwed up when writing the release notes. llReleaseCamera still does nothing.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
|
03-17-2006 09:57
From: Eep Quirk No, more immersion means being able to DO more in a view. There's no reason why everything in 3rd-person view can't be doable in 1st-person. Yes and no. Being able to edit in first person without being able to move your mouse without turning would suck a lot, but I do agree to the ability to touch, drag, and sit as necessary. I think access to your inventory should also be given. If we had the power to substitue key strokes we could simulate a first person view now by replacing turning with move left/right, and allow the mouse to control either rotation or normal cursor movement.
|
|
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
|
03-17-2006 10:13
Um, there's no reason the camera can't still be manipulated in 1st-person view either, Feynt. Simply alt-click to refocus the camera and it moves away from your av like it does now. Hit escape and the cam moves back to 1st-person view seamlessly. Try the above 1st-person view script from Kurshie to see how this would work (more or less--the script isn't perfect, and the cam screws up easily and isn't mouse-controllable like mouselook mode, but a proper 1st-person camera view would be like mouselook mode but show all GUI elements and allow camera refocusing).
|
|
paulie Femto
Into the dark
Join date: 13 Sep 2003
Posts: 1,098
|
thanks!
03-17-2006 11:53
Thanks for the tip on llReleaseCam(). I was being facetious when I claimed that first person view is more immersive without access to UI controls.  I agree that we should have access to all UI controls in fp mode.
_____________________
REUTERS on SL: "Thirty-five thousand people wearing their psyches on the outside and all the attendant unfettered freakishness that brings."
|
|
Maxwolf Goodliffe
Registered User
Join date: 30 Dec 2005
Posts: 137
|
03-17-2006 12:00
True that, mouselook is not fun because you canot do anything but "click, click, click, click".
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
03-18-2006 13:44
Not to mention that it would be nice to be able to use "click-to-target" in 3rd person mode as well as first person.
Really, the mouse-vs-key steering and 1st-vs-3rd person are really separate concepts.
They also need to get the ability of attachments to rotate the avatar as well. Just think, if you could capture mouse clicks in 3rd person, and move the avatar effectively, you could implement waypoint navigation.
|