
Fix colliders for SMS parts in KSP 1.0.5
sumghai opened this issue ยท 7 comments
While testing SDHI SMS 3.0.1 on a stock install with minimal dependencies (AnimatedDecouplers, RealChutes and MM), it was noted that when the Boost Protect Cover (BPC) and side fairings were jettisoned, they fall through some parts while intersecting/snagging with others.
Possibly requires several segments of non-concave colliders, similar to that outlined in this tutorial for making fairing colliders convex in preparation for 1.1's changes.
TODO:
- Test new AnimatedDecouplers DLL provided by @Kerbas-ad-astra
- Rework BPC colliders
- Change colliders to convex meshes
- Test clipping / collision with Mk1-2 Pod and docking port
- Test aero occlusion with Mk1-2 Pod and docking port
- Rework Service Module colliders
- Change colliders to convex meshes
- Test clipping / collision with Solar PV arrays and RCS as well as Mk1-2 Pod and heatshield
- Rework Avionics Ring colliders
- Change colliders to convex meshes
- Test clipping / collision with Mk1-2 Pod and heatshield
- Rework Side Fairing colliders
- Change colliders to convex meshes
- Test clipping / collision with Service Module, Adapter, Solar PV arrays and RCS
- Test aero occlusion with Service Module, Adapter, Solar PV arrays and RCS
Bear in mind that AD 1.2.1 produces NullReferenceExceptions on parts that don't pass an animationName to the module -- I've made and PRed a fix at Starwaster/AnimatedDecouplers#3, and I'm happy to toss you a compiled DLL if you can't compile it yourself. (This fix doesn't touch the animation issue that Starwaster is working on.) Those NREs seem to cause issues with collision (fairings falling through parts) and staging (LES towers and integrated SRBs not firing, as you're seeing in #67), and my fix repairs both.
That said, it probably would be good for the colliders to get attention, since KSP 1.0.5 is redefining all colliders to be convex (in preparation for Unity 5 in 1.1, which does not support concave colliders on rigid bodies). I noticed that, when testing your BPC, it seemed to "rip off" the solar panels (used for testing the cargo bay shielding, since they won't deploy when they're shielded) and docking port when it detached (I had to sink the solar panels into the command pod itself to keep them intact), while Modular Rocket Systems's LAS shroud did not. I might drop NecroBones a line to see if he made any adjustments on that point.
Bear in mind that AD 1.2.1 produces NullReferenceExceptions on parts that don't pass an animationName to the module -- I've made and PRed a fix at Starwaster/AnimatedDecouplers#3, and I'm happy to toss you a compiled DLL if you can't compile it yourself.
That would be very much appreciated, thanks :)
(This fix doesn't touch the animation issue that Starwaster is working on.)
Actually, turns out the animations not playing before decoupling was a PEBKAC on my part - I directly edited the Service Module and Avionics Ring CFGs on GitHub with waitForAnimation = true in September, but was testing an older local dev build last night without that added parameter. After syncing my local copy with the repo, the animate-before-decouple feature works just fine.
Sorry @Starwaster! I dun goofed :/
Those NREs seem to cause issues with collision (fairings falling through parts) and staging (LES towers and integrated SRBs not firing, as you're seeing in #67), and my fix repairs both.
It does? Holy crap, I definitely need your DLL :)
That said, it probably would be good for the colliders to get attention, since KSP 1.0.5 is redefining all colliders to be convex (in preparation for Unity 5 in 1.1, which does not support concave colliders on rigid bodies). I noticed that, when testing your BPC, it seemed to "rip off" the solar panels (used for testing the cargo bay shielding, since they won't deploy when they're shielded) and docking port when it detached (I had to sink the solar panels into the command pod itself to keep them intact), while Modular Rocket Systems's LAS shroud did not. I might drop NecroBones a line to see if he made any adjustments on that point.
Yes, the collider changes for 1.0.5/1.1 will still need to be done. It's going to be a bit of challenge, but I'm glad that at least we're now standardizing on convex colliders.
Yeah, KSP is pretty brittle in some ways -- I imagine that the NREs confuse the system as to which parts are shielded, and because shielded parts should not be staged or collide, this causes the staging and collision issues.
Here's a DLL for you: https://github.com/Kerbas-ad-astra/AnimatedDecouplers/releases/tag/v1.2.2-beta.1
Okay, just tested the new DLL.
- Staging issues seem to be fixed now
- BPC decoupler and jettison motors assigned to the same AG will both activate
- SM decoupler and escape tower motors assigned to the same AG will both activate
- BPC and fairings are still snagging onto other parts, due to changes in concave collider behaviour; this I can (hopefully) fix.
Many thanks for helping me eliminate part of the problem :)
Whoops, accidental closure.
a66f346 contained a fix by @Starwaster fixes Side Fairing aero occlusion by replacing ModuleAnimatedAnchoredDecoupler with ModuleAnimatedDecoupler.
I will now need to figure out how to configure the nodes used in ModuleAnimatedDecoupler to fire sideways.
BPC colliders reworked, collider intersection and aero occlusion tests passed.
The BPC jettison rocket motors have a tendency to sometimes overheat and destroy the Mk1-2 Pod, ParaDock, Heatshield, Service Module or Avionics ring. The thermal properties of various parts may need to be adjusted to make them more resilient.