Jump to content

Should my FollowCam droop?


Vulpinus
 Share

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

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

Recommended Posts

I have a vehicle, which imposes a fixed but poor camera position when seated. The solution: Override it with my own...

I've never used the camera functions before, but it looked simple enough:

llClearCameraParams(); // reset camera to default
llSetCameraParams([
	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, 50.0, // ( 0.5 to 10) meters
	//CAMERA_FOCUS, <0,0,5>, // 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, 60.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, <10.0, 0.0, 0.0> // <-10,-10,-10> to <10,10,10> meters
]);

Clearly that's taken almost straight from the wiki, with my adjustments for what I want (high, distant view so I can see a lot around the vehicle).

It works at first, but when I move, the camera gradually drops (over ten seconds or so) until it's level with me, behind me, and not at the 60° pitch that it started at. Occasionally the camera will jump back up there though, and if I deactivate and reactivate it (I have the above on a toggle with llClearCameraParams alone when 'off) it goes back up again. Only to droop back slowly again though.

Is this expected behaviour (if so, how do I fix it other than repeating the above on a timer) or is it likely caused by the existing camera position script in the vehicle? The vehicle's scipts aren't mine and are no-mod of course.

 

Link to comment
Share on other sites

Since you already know that the vehicle script has its own camera control code, it's a pretty sure bet that it's resetting your attempts to override it.   Usually, camera params are set when the driver sits but they could be reset when a passenger stands up, or when you cross a region boundary, or almost any other time when the scripter thought it was important.  They will also be upset, of course, if you scroll your mouse wheel in and out or if you focus deliberately on something.

Link to comment
Share on other sites

Rolig is right about residing scripts can overwrite your setting
Though it sounds like what you have is a prim property camera setting which can not be modified while you sit so it should be all right to overwrite it.

As a start change CAMERA_BEHINDNESS_ANGLE to something bigger like 180°
and see if that helps

:smileysurprised::):smileyvery-happy:

Link to comment
Share on other sites

Thanks for the answes folks. I thought it odd that the view drooped slowly when I moved, rather than simply being suddenly overridden by an existing setting.

Anyway, I solved the issue by reading more about how it all worked and dropping in a simple script to set the link camera settings for the sit link (turned out to be the root). Clearly that's how it was done in the existing script. Provided I made sure that my script runs after the original script gets a reset (which it does in certain circumstances) and before I sit, it works perfectly.

Problem solved :)

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...