Description
Environment
Second Life Release 7.1.8.9103842320 (64bit) - Materials Featurettes
Description
The code related to up/down camera limits were changed which causes a regression and causes a error where the user can end up flipping their camera upside down and also causes issues with the limits being applied at the wrong place.
Here is an unlisted video recording reproducing the issue: https://www.youtube.com/watch?v=ObZnP_t8PpM
My tank is a linden vehicle of type car with flags (VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_NO_DEFLECTION_UP that allows for tilting the camera relative to the vehicle.
This issue would affect any vehicle where the camera is fixed to roll relative to the vehicle. It is just significantly noticeable and a massive issue for my project which I've been working on for about 15 years.
I was also able to replicate the issue more severely in Kart 1.0 from the Library inventory where it doesn't clamp the look up at all. EDIT: I think this is because the sit target is a bit tilted rather than at ZERO_ROTATION; In current viewers it would have the max limit tilted with respect to the sit target, but in featurettes you can end up flipping your camera instead.
The relevant commit might be f815b01 after going through previous revisions and trying to find any changes to the camera clamping behaviour. Recommend reverting changes by this commit to llagent.cpp or fixing it carefully, the logic may seem simple but it is more complex.
Reproduction steps
All with the 7.1.8.9103842320 materials featurettes viewer, or alternatively the firestorm alpha/beta viewer.
- Vehicle which can tilt your camera, such driving a car or tank in mouselook and you are tilted on a very steep ramp/surface
- Try to keep looking up until you flip
Alternatively
- Visit Vertical Sim bottom ramp
- Try one of the [VS] Main Battle Tank 16 vehicles
- Drive up the ramp into the vertical sim cylinder level
- Try to move camera such as looking upwards to flip the camera or along the front towards the other end of the cylinder
Vehicles that have a rotated sit target:
- Rez and sit in a chair or vehicle that has a tilted sit target, like Kart 1.0 from the Library
- Try to keep looking up until you flip
Any sit target with an object that is rotated:
- Rez a cube and script it with a sit target such as llSitTarget(<0,0,1>, ZERO_ROTATION);
- Sit on the cube
- Rotate the cube at an angle, such as <0,315,0> (45 degrees backwards)
- Go into mouselook and look up