Jump to content

[1.1] QuantumStrutsContinued 1.6 - Magical Struts for Rigidifying Outside the VAB!


toadicus

Recommended Posts

Hi V8 Jester asked me to pop in , not sure how that strut gun thing works, but if  i understand it right it uses ray cast with an animated beam, if the beam is made of a particle emitter then yes that is the reason it is wandering at high speed, world space does not tie the emitter to its parent transform and  the only way to adjust that is in unity , it's second check box down in the particle emitter window.

Now if you don't want to fight with unity and do have access to the original assets i could easily re export them with right settings and send them back

Link to comment
Share on other sites

it's a Line Renderer, but similar to particle emitter.

maybe it's this in QuantumStrut.cs, not sure if it'll require changing the CheckHit() stuff. Similar setting in Strut.cs, but I don't know if that's still being used?

        void InitLaser()
        {
            if (!Util.isValid(lr))
            {
                lineObj = new GameObject();

                lr = lineObj.AddComponent<LineRenderer>();
                lr.useWorldSpace = true;

                lr.material = material;
                lr.SetColors(startColor, endColor);
                lr.SetWidth(StartSize, EndSize);

                lr.SetVertexCount(2);
                lr.SetPosition(0, Vector3.zero);
                lr.SetPosition(1, Vector3.zero);
                lr.castShadows = false;
                lr.receiveShadows = true;
            }
        }

Edited by nli2work
Link to comment
Share on other sites

I'll look in to that.  @nli2work is correct that it's a linerenderer, and I don't think it's actually bound to any particular emitter on the model (just a transform), so I'm not certain that the Unity tweaks that @SpannerMonkey(smce) brought up will work.  I'm also not sure I have the original Unity assets.  I'll mess around with useWorldSpace.  Thanks!

Link to comment
Share on other sites

the parts just uses stock linear thruster models. QuantumStrut creates lineRenderer object with point-0 at the part's root; then point-1 at whatever the raycast hits (inside maxium length setting)... there's option to specify a transform. I don't know if the actual joint is between the part's root and raycast hit, or from the specified transform and raycast hit.

Link to comment
Share on other sites

  • 1 month later...

It will be, and I have a version that compiles, but I need to test it a bit and want to try and hunt down the "high speed activation" bug that's been reported.  Stay tuned; hopefully something this weekend. :)

Link to comment
Share on other sites

15 minutes ago, toadicus said:

QuantumStruts has been updated to version 1.6!  This update brings KSP 1.1 compatibility and squashes the "lagging strut" bug.

Thanks man.  For some reason I simply won't play far into a new career mode without this mod installed, and I'm really happy to see it getting the continued love it deserves :)

Link to comment
Share on other sites

Cheers. :)  For those interested, the bug was actually due to the positions being set in FixedUpdate, which happens when physics calculations are done, instead of Update, which happens when GUI frames are rendered.  In most configurations there are more of the latter, so it appeared to lag behind (even though it was technically keeping up).

Link to comment
Share on other sites

  • 2 weeks later...

@Zubster, I have no reason to believe it won't work, but my copies are always recompiled before I start up the latest versions of KSP so I can't tell if there are binary-level changes that might need to happen.  Can you (or anyone else) confirm the current upload is still working in 1.1.2?

Link to comment
Share on other sites

would it be easy to set struts to use list of transforms instead of just first transform the module finds? total strut strength doesn't multiply, just distribute among the transforms. I think that could allow other modders to embed transforms in parts for quantumm strut activation using MM to add strut module. if player doesn't use quantum strut, the transforms are harmless in the other mod's part.

Link to comment
Share on other sites

5 minutes ago, toadicus said:

@nli2work, I'm pretty sure that would be very straightforward.  You're just talking about assigning the transform name for the actual QuantumStrut  "emitter" itself, right?

yep. Currently the strut just emits from 1st transform that matches the name assigned in the strut module. I embedded 4 transforms in the part hoping it'd look like 4 struts attached radially. in other words the emitters would work just like thrustTransforms in engine modules, visual FX is attached to all thrustTransforms in the part.

Edited by nli2work
Link to comment
Share on other sites

just visually, in the same way multiple thrustTransforms have multiple particle emitters, but over all engine thrust isn't multiplied by the # of thrustTransforms. I don't know how exactly quantum strut ties the lineRenderer and Joint creation so I don't know if it's easy to do or not. Essentially 1 lineRenderer per transform, but only 1 physics joint pert part.

Edited by nli2work
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...