-
Posts
2,419 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by lo-fi
-
It's an idea at the moment, but that's exactly it. And seeing as I'm writing it, I can (and will) build in a mechanism to allow the plugin that sits on top of it to adjust the response too. Steep learning curve with code, but get stuck in! You'll be surprised what you can achieve. Don't forget that what we're writing can be used by other mods. And, in fact, other Unity games that require a wheel collider. Adapting ALG should not be hard. Hahaha! The hype train is a long, long way in the distance. A faint sound of a horn, maybe... EDIT: Just had a look through the ALG thread. Seems that BD came to the same conclusion I did about U5 colliders and their ping-pong ball stability. Also that they needed the fish slapping rule implemented in that thread It's been the intention from the start to produce a workable collider that's discreet and separate from KF itself, and seeing that awesome set of landing gear sat unloved due to U5 makes that decision look even better. Meanwhile, code continues to be duct taped back together...
-
Thanks for the confirmation, I was rapidly coming to that conclusion myself! I've got it functional in U5 - the joint suspension self supports when applied to a model approximating a KSP "Vessel", so I'll work on that and leave you to strip the redundant bits out of your code if that's OK? Compression against the spring rate is about the best we can do to pass out to the friction code. As I think we've discussed, along with @damerell (I think), we have edge cases where the suspension is too high a spring rate to compress, or two soft to actually suspend the weight it's carrying without resting on the bump stop which we can't measure. A PID loop adjusting the spring rate so we're always within the sprung range *could* actually work quite well and give an interesting sort of active stability control too. I believe this is actually something Squad were attempting with the stock colliders. We can, of course, do it better Have a good trip!
-
Well, it was a lot of fun doing it @Shadowmage I'm really, really sorry for what I'm doing to your code. I've really got stuck in tonight and it's utter carnage in my branch right now but does at least compile. Hopefully all will become clear once I've added joints in, and you can help patch together the friction stuff from what I can throw out of the joints.
-
Please feel free something I used to love about this thread was the rich diversity of suggestions and wild ideas people threw our way. Great for motivation, and reminding us that we do this for fun! I can't guarantee I'll want to make a particular thing anyone might suggest, but inspiration is always welcome, even though there's lots of work still to be done on the plugin. Thanks again for the kind words. Suggest, discuss, dream.... Always welcome here.
-
Hello, sorry for very late reply. As you may know from a few posts back, I've been suffering from a lower back injury, which has meant I've not been able to sit still for longer than about half an hour. Not conducive to coding, I'm afraid The good news is I've been having some great treatment, so I'm able to start picking it up again. Sorry to those of you who are patiently waiting - it's put me back many weeks. Thank you all for your patience. Special thanks to those who've stepped in with the fish slapping - I've been most amused
-
If I was playing, I'd miss functional wheels too. @Shadowmage I've created a branch, and working through the bits we've discussed. Do you mind if I move some code around between the classes? The wrapper seems to trigger some init stuff that I think ought to be in the wheel class itself. I'll rejig and see what you think, anyway. I'll also pull out the suspension stuff and pack some jointy goodness in, of course!!
-
Cheers dude, I'll see what I can so. Figured the grip model doesn't care what creates the suspension, and something I've not worked on at all. Minor setback. I know I can get the joint based suspension working - it's just a matter or tweaking it. Tempted to re-release the repulsors first, as the don't need a grip model but could server as a useful "open beta" type test of the suspension while we finesse the grip stuff. Have a great trip!
-
Fear not - this is where my knowledge comes into play. I've probably got more experience than anyone in the KSP modding community when it comes to joints. I'd stopped that bit of my approach as it was appearing that yours was leading us to a solution, but I'll pick it back up. Squad struggled with wheels attached to small parts, and implemented some hack workaround which I'll try to dig up. We knew this would be difficult!
-
Shadowmage is doing some amazing work, for sure. I'm struggling with a back problem, which means I'm not able to sit for extended periods and is holding me up somewhat! There's certainly some opportunity for performance optimization. Static wheels could probably be made to skip large parts of their update routines, which would save some processing cycles. I ought to look into Ferram's multi thread thing and see if that's possibly any use too, but that's a way away. As ever, thanks for keeping the faith!
-
Yeah, sorry it's taking a while. ShadowMage is writing a brand new wheel simulation model to fix the "odd" behavior of stock parts, and to allow the more advanced KF parts to function as they should. Sadly, it's not easy. Once it's done, it will be AWESOME, though. Better than even the previous versions. Thanks to all for hanging in there and patiently encouraging. We're just as excited as you!
-
The solution is maybe not to break the joints. Simply set the connected body to null and set the linear and rotational joints to free. I've been though this with my trailer hitch module, so look that up in the dev branch of KF. It's a mess, but you'll get the idea. I reckon the sticky friction is solvable with the joint too - they were rock solid in my testing. Glad the vector projection is what you're after. @ZodiusInfuser was kind enough to help me out with that. https://github.com/KerbalFoundries/KF_plugin/blob/Dev/KF_plugin/KFCouplingHitch.cs
-
For Future reference: Code to project a vector onto a plane, which is defined by its normal. A bit like casting a shadow of a line in 3D space onto a 2D surface, for those who want an easily visualised explanation. Vector3 projectedVector = <VectorToProject> - (<PlaneNormal>) * Vector3.Dot(<VectorToProject>, <PlaneNormal>);