I'm finishing up a car i'm building and i've added the option to choose between different camera types. I also made a dashboard camera becauase the mouselook is just a little too high. But now i'm having a lot of issues with the dashboard camera. It's at the right position and when i'm driving over flat lands it's great. There's some slight motion when i accelerate or brake, which gives it a very realistic feeling. But once i go over a hill or bump, being prim or terrain, the camera flies trough the roof or the bottom of the car. It looks like it's following the terrain, but then very extremely.
I've been tweaking the camera for quite a while now but i really can't figure out how to stop doing this. Looking trough the LSLwiki and changing every setting in the script to figure out what does what hasn't really been succesful. I have to admit i find the LSLwiki to be written rather confusing. Might be because English is not my native language but i really cant'make a lot of sense out of the wiki.
So my question is if somebody could help me figure out what i'm doing wrong here. And how i keep the camera moving a little bit while driving, but not moving up and down when driving over a bump.
Any help will be appreciated. This is the code that i'm using:
CODE
dashboard_cam()
{
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, 8.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, 0.0, // (0 to 4) meters
CAMERA_PITCH, 9.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, <7.85,-0.08,-2.10> // <-10,-10,-10> to <10,10,10> meters
]);
}
Thank you in advance!
Owen