Bug #6399
SPH camera ceiling clipping calculation is wrong
0%
Description
SPH camera is implemented this way:
There is a focal point around which it is possible to pan the camera. The camera has the focal point always in the center of the view and it can view it from all sides including from above and below. When panning the camera around the focal point, the game makes an effort to keep the camera at constant distance unless clipping with ceiling or floor would occur.
Expected behavior:
When panning the camera above the focal point would bring it above cailing structures of the building, the editor positions the camera at the intersection of the ceiling plane with line from the focal point to the intended camera position.
When panning the camera above the focal point and the camera does not get positioned above the ceiling, the camera position is unaffected and keeps constant distance to the focal point.
Observed behavior:
Depending on height of the focal point and camera zoom level, the camera behaves weird when looking from above.
Game probably assumes the camera is fully zoomed out (i.e. the distance from the focal point is greatest possible), evaluates by how much the camera needs to be shifted in, then shifts it in regardless of current zoom level. This results in the zoomed camera being pushed in unnecessarily when there is plenty of room between it and the ceiling, and being pushed through the focal point to the other side, looking away from it.
Reproduction steps:
Note: The behavior depends both on camera angle and on height of the focal point. Please try to follow the steps as exactly as possible without any additional or different camera moves to get accurate reproduction of the issue.
1/ Download the attached SPH Measure.craft and save it into an existing Sandbox save directory (under Ships/SPH)
2/ Start KSP and enter the Sandbox save to which was the craft copied
3/ Enter SPH and load the SPH Measure "ship". The view should be similar to picture 1
4/ Zoom the camera in as much as possible (numpad "+" or mouse wheel up). Resulting view should be similar to picture 2. Note: this MUST be a zoom in. Do NOT move the camera closer by shifting the center of view.
5/ Adjust vertical position of the focal point all the way up to look straight at the upper beam (PageUp or Shift + mouse wheel up). Resulting view should be similar to picture 3
6/ Pan the camera up to look at the beam from above (right mouse button + drag down). Notice the camera first turns around the beam, then dives into the structure and ends up looking at the bottom two beams and the bottom fuel tank. (pisctures 4 through 6)
7/ Pan the camera horizontal again, move focal point lower, e.g. to face second beam from top. Repeat the pan to look from above. Notice the camera again ends up looking at two bottom beams and the fuel tank.
There is plenty of room above the demonstration structure for the camera to be positioned freely above it, especially when fully zoomed in, i.e. close to the object. It is possible to view it from above with less zoomed in camera without ceiling structures becoming visible. The fact that zoomed in camera behaves this way makes it particularly annoying when working on details and trying to put parts into precise positions.
Partial workaround for the behavior is to put the object close to the ground. In such case the effect is minimal or not present but it is then impossible to look at the craft from the bottom. And clipping with the floor is also not implemented very user friendly, the camera gets stuck in the floor at the point where it touched it and it is not possible to pan it further down without decreasing zoom level.
Since I am meeting this problem constantly ever since it was introduced to the game I am giving it priority Low: visual issue that occurs often.
History
#1 Updated by TriggerAu over 8 years ago
- Status changed from New to Needs Clarification
#2 Updated by Kasuha about 8 years ago
Problem is still present in 1.2
#3 Updated by Kasuha about 7 years ago
Problem is still present in 1.3.1 and is still as annoying as ever. I made a short video demonstrating the problem, notice that when the camera is zoomed out the clipping makes kind of sense and demonstrates there is plenty of room for the camera, but when zoomed in the camera goes through and below the target instead of viewing it from constant distance.