Jump to content

FollowCam view for vehicle


Carbon Philter
 Share

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

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

Recommended Posts

Hi again, scripting gurus.
Is anyone an expert with the Dan Linden FollowCam settings and could help me?

I've been trying all sorts of permutations with the variables for a while now and am beginning to think that what I want to achieve can't be done, but I'd be more than happy to be proved wrong.
For a vehicle - ship - being driven, I can happily get any number of views tracking movement from behind, ranging from the worm view below to overhead, but I'm trying to get a sideview and also a rearview and haven't yet been able to achieve it, even with the rearview_cam parameters in the script from the Wiki
.
Having looked at the way the spin cam works I'm coming round to thinking that the only way to get a continuous side/rear facing view would be to replace the 'for' statement with a timer and constantly updating the camera position by using llGetPos()  and adding the appropriate local offset and rotation to it. Here's the spin_cam parameters I was thinking of using as a starting point:

spin_cam()
{
    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, <0.0,0.0,5.0>, // region relative position
        CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds
        CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
        CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
        CAMERA_PITCH, 30.0, // (-45 to 80) degrees
        //CAMERA_POSITION, <0.0,0.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, <0.0,0.0,0.0> // <-10,-10,-10> to <10,10,10> meters
    ]);
 
    float i;
    vector camera_position;
    for (i=0; i< 2*TWO_PI; i+=.0125)
    {
        camera_position = llGetPos() + <0.0, 14.0, 0.0> * llEuler2Rot(<0.0, 0.0, i>);
        llSetCameraParams([CAMERA_POSITION, camera_position]);
    }

 
Am I missing something fundamental or are my attempts to achieve these other views doomed to failure and I will have to simply resort to overriding the normal camera view using Ctrl/Alt/LMB?

Thanks
Carbon

Link to comment
Share on other sites

Thx for suggestions.

I've used them in the past when fixing a specific view.

I'll try them but they relate to one-off camera settings rather than the params which allow you to change camera on the fly. According to the wiki - http://wiki.secondlife.com/wiki/LlSetCameraParams - these particular settings do not appear.

Hey ho, back to more experimenting!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3311 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...