|
Kanna Brandeis
Registered User
Join date: 21 Aug 2006
Posts: 9
|
02-27-2007 08:48
I have a camera view looking straight down - what I want is to be able to rotate the view so it's still straight down, but with the user's "up" as east, north, west, south. 90 degree turns still straight down. Can anyone tell me how to do it? Here's how I'm setting the camera view: setCamera() { //llOwnerSay("setCamera called"); llSetCameraParams([ CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive //CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees //CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds //CAMERA_DISTANCE, 10.0, // ( 0.5 to 10) meters CAMERA_FOCUS, location + <0,0,-2>, // region relative position //CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds CAMERA_FOCUS_LOCKED, TRUE, // (TRUE or FALSE) // CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters CAMERA_PITCH, 80.0, // (-45 to 80) degrees CAMERA_POSITION, location, // region relative position //CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds CAMERA_POSITION_LOCKED, TRUE, // (TRUE or FALSE) CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters CAMERA_FOCUS_OFFSET, <0,0,0> // <-10,-10,-10> to <10,10,10> meters ]); }
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
02-27-2007 15:42
The only way I can think of is, instead of looking truly straight down ( < 0, 0, -1 > ), look almost straight down, but bias it a tiny bit so that you can tweak the "up" vector as desired, e.g., < 0, 0.0001, -1 > would make global +y (north) point toward the top of the screen. The very slight deviation of the camera axis from true-vertical wouldn't be noticed.
|
|
Kanna Brandeis
Registered User
Join date: 21 Aug 2006
Posts: 9
|
03-04-2007 11:07
Thank you, Deanna.
That did work - I had to make it 0.01 - at 0.0001 there was no perceptible effect and at 0.001 only a slight angle change, but 0.01 worked and still appeared "downward" enough.
I greatly appreciate the assistance!
-Kanna
|