BrettRyland / BDArmory

Gun turrets and other weapon systems for KSP
32 stars 23 forks source link

The problem with the appearance of a rocket #566

Open Occupant1 opened 8 months ago

Occupant1 commented 8 months ago

Hi! I am using an Armory mod with a mandatory physics expansion mod, but I have a problem that makes it impossible to play. Please help solve it!

The problem is that when I'm fighting with two devices, a "[Physical Range Extender] Extending terrain: landing vessels.". At the moment I can't switch to other ships, and I have to wait a long time for this inscription to disappear (my computer is not weak). image

Then, when the inscription disappears, then I can safely play, but there is still this infuriating bug when I zoom in on the camera image

Then I calmly control my plane, but, for example, if I fail and press "Restart flight", then it will appear in the air at the Kerbin equator (perhaps this is the zero coordinate, I am not an expert in this). The same inscription will appear on the screen because of which you have to wait a long time image

When the inscription disappears, the rocket on which I wanted to blow up a ground target disappears, and the ground target itself suddenly appears in space.. In this case, I wanted to launch a small rocket from the island to the mission control center, where the air defense system was located. But when I resumed the flight, the rocket appeared in the air at the zero coordinate with the same inscription with a mod for expanding physics, then the rocket evaporated, and the air defense system suddenly appeared in space. image

The file with the KSP logs: KSP.log

P.s: I don't have many mods. Only a mod for weapons and mandatory mods for it, as well as a couple of mods for graphics. I don't speak English and use a translator, some words were translated incorrectly. If something is unclear, I can explain.

BrettRyland commented 8 months ago

There are several things happening here, mostly related to PhysicsRangeExtender (PRE) and landed vessels.

The issue with the zoomed-in camera is due to PRE adjusting the near clip plane (https://docs.unity3d.com/ScriptReference/Camera-nearClipPlane.html), which it looks to be doing when there are multiple landed vessels a long way away from KSP's floating origin. Setting the CamFixMultiplier to a smaller value (such as 0.1) in GameData/PhysicsRangeExtender/settings.cfg may help with this.

PRE also has some special handling of vessels that should be landed while it's extending the terrain. Until those vessels are actually landed, PRE won't let you switch to them (it'll immediately switch away again). My understanding of it is that this is done to prevent the vessels from falling and breaking while the terrain gets loaded in underneath them. This doesn't seem to have much to do with how powerful the computer running it is, but rather how long it takes for KSP to make contact between the terrain and the vessel, which can take an annoying long time. This is particularly noticeable when loading a save with multiple vessels several km apart. I don't know how to work around this. However, BDA's vessel spawner initially has the vessels not being grounded, but rather lowered to the ground slowly, so this is less of a problem for spawning in vessels with BDA. You may need to scout out the terrain at the spawning sites before spawning though to get the terrain to initially load.

The next issue is with the launch clamps. KSP does some extra stuff when spawning vessels with launch clamps that BDA's vessel spawner doesn't know about and as such, can't handle. Launch clamps being attached also tell KSP that the vessel ought to be landed even when it isn't and KSP will sometimes move the vessel to weird places if it has launch clamps on it and sometimes it will summon the Kraken as you've seen. The solution is to not use launch clamps.