Jump to content

Setting camera position


Poltergeist Azarov
 Share

You are about to reply to a thread that has been inactive for 3484 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi, I been playing with llSetCameraParams() to prepare various camera positions for my vehicle but wasnt really succeed at all. I have two of camera params of sets for back gear camera view and normal driving cam. I just want to place in my scripts two more cam options; one is in the front of the vehicle and the other one is above of driver. However I wasnt succeed by setting simple two camera positions by using llSetCameraParams() ... Any suggestions?

Link to comment
Share on other sites

llSetCameraParams() can not set a position in front of you when you are on a moving vehicle
The best you can do is to set CAMERA_BEHINDNESS_ANGLE, 180.0
With this setting the camera will not move when it starts out in front of you or your turn you vehicle 180 degrees, but it will change position when the vehicle moves on a straight line: the camera will end up behind you

llSetCameraParams() can not set a position right over your head on a moving vehicle
The closest you get is 10 degrees from vertical
Set CAMERA_PITCH, 80.0

With llSetCameraAtOffset() and llSetCameraEyeOffset() or llSetLinkCamera() you can set any camera position relative to the prim you sit on, also a position in front of you
The camera stays in the same relative position to the prim no matter how the prim moves
This approach has disadvantages:

  1. The cam position is taken when you sit on the prim and can not be changed while you sit
  2. The cam position is locked and can't even be changed with the mouse-wheel
  • Like 1
Link to comment
Share on other sites

Thanks alot Dora... However I made a front (dynamic) camera which stays on front of avatar right now during driving. So thank god I didnt have to use a static cam which works only when you sit on object. And also it was very simple(even if taken a day to figure it out). I am just going to improve it now and will try to make some other smiliar way of views. Parameters are as follows:

CAMERA_FOCUS_OFFSET, <10,0,0>,

CAMERA_ANGLE, 180,

CAMERA_POSITION_LAG, 0


 

Link to comment
Share on other sites

Interesting! I never tried this setting before now
I made it for my boat and I find it doesn't make much difference to what I new before

  • It doesn't shift the camera to look at me from the front
  • When I get it to look at me from the front it doesn't stay there for long
    It ends up looking at me from behind when I sail away

Sorry to be such a killjoy but either I don't know all the story or your suggestion doesn't work

:smileysurprised::):smileyvery-happy:

Link to comment
Share on other sites

The last version of it is this. I suggest you to give it a try when you are sat on the vehicle. Btw I sent you an offline message from inworld. Hope you'll like this version...



        llClearCameraParams();
params=[CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive CAMERA_BEHINDNESS_ANGLE, 0.0, // (0 to 180) degrees CAMERA_BEHINDNESS_LAG, 0.0, // (0 to 3) seconds CAMERA_DISTANCE, 5.0, // ( 0.5 to 10) meters //CAMERA_FOCUS, <0,0,0>, // region relative position CAMERA_FOCUS_LAG, 0.0 , // (0 to 3) seconds //CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_FOCUS_THRESHOLD, 1.0, // (0 to 4) meters CAMERA_PITCH, 8.0, // (-45 to 80) degrees //CAMERA_POSITION, <0,0,0>, // region relative position CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds //CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE) CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters CAMERA_FOCUS_OFFSET, <9.0, 0.7, 0.0> // <-10,-10,-10> to <10,10,10> meters ];

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3484 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...