damerell Posted October 17, 2016 Share Posted October 17, 2016 I have a stupid question; those are my job. Can't bump-stop largely be handled by a protrusion on the part the shape of the wheel (less a bit for tyre compression fore and aft) with the suspension fully compressed? Link to comment Share on other sites More sharing options...
Shadowmage Posted October 18, 2016 Share Posted October 18, 2016 @lo-fi What if it isn't the anchor points that are being screwed up in KSP, but the anchor axis directions? That would cause the effect that I was seeing, as it would try to rotate the RB into position relative to the axis. I know for certain that on the Launchpad Vector3.up != transform.up even for a vertically aligned transform. I don't remember offhand if you were using world-axis setups for the anchor axis assignments, or transform axis. I also don't know what frame the joints are -supposed- to be setup in (world, local). Anyhow, just a thought that popped into my head that might explain part of what was seen on the joint-based setup... 15 hours ago, damerell said: I have a stupid question; those are my job. Can't bump-stop largely be handled by a protrusion on the part the shape of the wheel (less a bit for tyre compression fore and aft) with the suspension fully compressed? Yes, and no. Yes, technically it can, or at least should be possible. No, in reality it cannot as standard colliders do very strange stuff when used like that. They like to 'snag' on seams between triangles, and will certainly come to an abrupt stop if they hit any sort of 'lip'. There is a friction setting for the collider that is -supposed- to fix most of that... only it doesn't work as advertised; even when set to zero friction the collider still exhibits friction and loves to snag on things. Sadly, if we go with the force-based solution, that is likely exactly what will be done. It works okay, unless you come down hard off of a jump or something and briefly bottom out the suspension... then weird stuff happens. Link to comment Share on other sites More sharing options...
Madrias Posted October 19, 2016 Share Posted October 19, 2016 14 hours ago, Shadowmage said: unless you come down hard off of a jump or something and briefly bottom out the suspension Idea, and not sure if it's possible, or even practical: What if you set the suspension up with the equivalent of progressive rate springs? The idea being that to briefly bottom out the suspension would require so much force it'd shear the wheel off of the craft instead. So the idea would be that at most normal weights and loads, the spring force would be minimal, just enough to give it suspension, but the closer you get to full compression, the higher the spring's force would be, pushing against the forces trying to smash the bump stops. End result would be, if you set the upper limits aggressively enough, an appearance of 'bottoming out' (hitting the maximum compression limit for the current amount of weight against the force applied to the sprin, versus actually running out of suspension travel), and wheels that still work. As said, not sure if it's possible, practical, or whether you guys have a better idea in mind. I just think of strange things at times. Link to comment Share on other sites More sharing options...
Shadowmage Posted October 19, 2016 Share Posted October 19, 2016 9 hours ago, Madrias said: Idea, and not sure if it's possible, or even practical: What if you set the suspension up with the equivalent of progressive rate springs? The idea being that to briefly bottom out the suspension would require so much force it'd shear the wheel off of the craft instead. So the idea would be that at most normal weights and loads, the spring force would be minimal, just enough to give it suspension, but the closer you get to full compression, the higher the spring's force would be, pushing against the forces trying to smash the bump stops. End result would be, if you set the upper limits aggressively enough, an appearance of 'bottoming out' (hitting the maximum compression limit for the current amount of weight against the force applied to the sprin, versus actually running out of suspension travel), and wheels that still work. As said, not sure if it's possible, practical, or whether you guys have a better idea in mind. I just think of strange things at times. In an ... analogue?.. world, yes, that would work. Sadly, we have to use discrete time steps, and the problem with variable spring response is that the difference in compression between frames can cause such a large difference in the spring output that you end up with oscillations, or worse, launching things into orbit. Might even work acceptably if we could crank the simulation frequency up to 1000hz or so, but that is not really an option if we want real-time physics for anything beyond a single part. So, not a bad idea, merely one that won't work very well with the constraints in place in video game physics. However, I might be able to use a much slower response rate on the spring value when it is detected to be at bump-stop -- slowly increase the spring rate until it lifts up a bit. Link to comment Share on other sites More sharing options...
Madrias Posted October 19, 2016 Share Posted October 19, 2016 I keep forgetting that things that work in an analogue fashion don't always translate well to what limitations you have to work with. What I do is come up with crazy ideas and hope they're practical. If it spawns something useful, I take that as a win in my book. Link to comment Share on other sites More sharing options...
Shadowmage Posted October 19, 2016 Share Posted October 19, 2016 5 minutes ago, Madrias said: I keep forgetting that things that work in an analogue fashion don't always translate well to what limitations you have to work with. What I do is come up with crazy ideas and hope they're practical. If it spawns something useful, I take that as a win in my book. No worries, never know when you'll hit gold. Actually had someone suggest an off-the wall solution to me for fixing the 'sticky friction' problem for the force-based suspension setup -- a solution that looks like it will probably work out. Also never know when your crazy ideas will spawn further crazy ideas in the head of whomever is reading them. Had that a few times that resulted in new features or solutions to problems that nobody was expecting. Link to comment Share on other sites More sharing options...
KERBALZ Posted October 19, 2016 Share Posted October 19, 2016 I'm probably the 500000th person to ask this but please make this for 1.2! PLZZZ Link to comment Share on other sites More sharing options...
TARDISES Posted October 20, 2016 Share Posted October 20, 2016 2 minutes ago, KERBALZ said: I'm probably the 500000th person to ask this but please make this for 1.2! PLZZZ Link to comment Share on other sites More sharing options...
KERBALZ Posted October 20, 2016 Share Posted October 20, 2016 ? Why the holy mackerel? Link to comment Share on other sites More sharing options...
TARDISES Posted October 20, 2016 Share Posted October 20, 2016 Because you asked for an update. Link to comment Share on other sites More sharing options...
V8jester Posted October 20, 2016 Share Posted October 20, 2016 18 minutes ago, KERBALZ said: ? Why the holy mackerel? Yeah asking for update is no bueno! Lucky for you, you only got one......... Or is it Two Link to comment Share on other sites More sharing options...
lo-fi Posted October 21, 2016 Author Share Posted October 21, 2016 Right.... overuse of debug messages to the log reveals that the anchors are created successfully in the correct position, though they are not visible... I can't figure out why. Presumably something to do with shaders, though I've run out of energy to fight with KSP to figure out how to apply a KSP shader - bla, bla, bla. The rotation of the anchors is set the same as the wheel object every frame, and in any case, the angular drives are set to free, meaning the cannot impart any torque back to the connected object. I'm bored, frustrated with something that clearly doesn't want to be for a game I don't play any more, and about to give up. Link to comment Share on other sites More sharing options...
SpannerMonkey(smce) Posted October 21, 2016 Share Posted October 21, 2016 5 minutes ago, lo-fi said: though they are not visible... I can't figure out why. Just grabbing at straws but it's not a layer issue ? wheel collider ignore layer 26 will render things invisible. Probably not, as it's unlikely you've forgotten, but worth a mention in dire times Link to comment Share on other sites More sharing options...
lo-fi Posted October 21, 2016 Author Share Posted October 21, 2016 ah yes, I'd forgotten about that little gotcha... Link to comment Share on other sites More sharing options...
Shadowmage Posted October 21, 2016 Share Posted October 21, 2016 12 minutes ago, lo-fi said: Right.... overuse of debug messages to the log reveals that the anchors are created successfully in the correct position, though they are not visible... I can't figure out why. Presumably something to do with shaders, though I've run out of energy to fight with KSP to figure out how to apply a KSP shader - bla, bla, bla. The rotation of the anchors is set the same as the wheel object every frame, and in any case, the angular drives are set to free, meaning the cannot impart any torque back to the connected object. I'm bored, frustrated with something that clearly doesn't want to be for a game I don't play any more, and about to give up. Hmm.. that is unfortunate on the anchors. Yeah, trying to debug the stuff in KSP is more than a bit of a headache. Sadly I'm out of ideas for ways to help with the joint based solution; for some reason they still don't get along with me even in Unity versions where they work properly. However I -think- I've found solutions to most of the problems that the force-based suspension setup was encountering. Haven't been able to put it all together for testing yet, but may be able to get something usable next time I can sit down and work on it. So there is perhaps some light at the end of the tunnel... it still looks like a pretty long and dark tunnel, but at least there is some end in sight. If you do feel the need to move on to something else (and I can't blame you for that, I've been more than a bit frustrated when working on the wheels stuff myself), would you have any objections if I were to try and continue KF development through a fork? Link to comment Share on other sites More sharing options...
lo-fi Posted October 22, 2016 Author Share Posted October 22, 2016 (edited) Ah ha, I finally managed to make some progress. The script gets added to the gameObject where the wheel collider is: Super hacky, but this is what I'm using. using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Text; using UnityEngine; namespace KerbalFoundries { public class WCReplacer : PartModule { public override void OnStart(PartModule.StartState state) { base.OnStart(state); if (HighLogic.LoadedSceneIsFlight) { StartCoroutine(WaitForFixed()); } } IEnumerator WaitForFixed() { print("WCR waiting for fixedupdate1"); yield return new WaitForFixedUpdate(); print("WCR waiting for fixedupdate2"); yield return new WaitForFixedUpdate(); print("WCR waiting for fixedupdate1"); yield return new WaitForFixedUpdate(); print("WCR waiting for fixedupdate2"); yield return new WaitForFixedUpdate(); print("WCR waiting for fixedupdate1"); yield return new WaitForFixedUpdate(); print("WCR waiting for fixedupdate2"); yield return new WaitForFixedUpdate(); print("WCR Fixing colliders"); foreach (WheelCollider WC in this.part.GetComponentsInChildren<WheelCollider>()) { print("WCR Found collider"); print(WC.gameObject.name); SLWheelCollider SLW = WC.gameObject.AddComponent<SLWheelCollider>(); Destroy(WC); } yield return null; } } } Edited October 22, 2016 by lo-fi Link to comment Share on other sites More sharing options...
lo-fi Posted October 22, 2016 Author Share Posted October 22, 2016 Honestly, please do what you like. I'm sick of this. Link to comment Share on other sites More sharing options...
V8jester Posted October 22, 2016 Share Posted October 22, 2016 2 hours ago, lo-fi said: Honestly, please do what you like. I'm sick of this. It's downright sickening to think of how well this worked in 1.0.5 and how much the new Unity update borked everything up. I'm sorry lo-fi. It's obvious this has been a taxing journey. Link to comment Share on other sites More sharing options...
lo-fi Posted October 22, 2016 Author Share Posted October 22, 2016 A comedy of errors... Nvidia messed up the wheel colliders Unity carried that forward Squad chose to upgrade knowing wheels weren't fit for much Weve been paying the price ever since. I'm tired of fighting with it, it isn't fun. Link to comment Share on other sites More sharing options...
gomker Posted October 22, 2016 Share Posted October 22, 2016 4 hours ago, lo-fi said: Weve been paying the price ever since. I'm tired of fighting with it, it isn't fun. Take a break man , don't want to get burned out on something that is supposed to be fun. Buy you a beer over the internet if I could Link to comment Share on other sites More sharing options...
Vrana Posted October 22, 2016 Share Posted October 22, 2016 4 hours ago, lo-fi said: A comedy of errors... Nvidia messed up the wheel colliders Unity carried that forward Squad chose to upgrade knowing wheels weren't fit for much Weve been paying the price ever since. I'm tired of fighting with it, it isn't fun. The wheels and tracks from your mod were the best we had by far. I hope at some point you will find the will to "play" with them again. If not, you did way more then most, thank you. Link to comment Share on other sites More sharing options...
Tr1gg3r Posted October 22, 2016 Share Posted October 22, 2016 i see ya getting a bit fed up lads with how its going.....chin up....youll deffo be getting beer off of me, ifu can work this out.....im sure you can do it \o/ this is the only mod ive never been able to use, but always wanted the most. lol typical as @gomker says - take a break fellas Link to comment Share on other sites More sharing options...
SpannerMonkey(smce) Posted October 22, 2016 Share Posted October 22, 2016 5 hours ago, lo-fi said: A comedy of errors... Hey, feeling your pain, the moving, wobbly goalposts aren't much fun right now i know. Ah fun yes i remember that wasn't that 76? Anyway before you run screaming into the night, tis the season for it, those wheel direction indicators you had on one of the KF releases, are/were they a code thing or a unity wrinkle/tag you'd discovered?, could really do with some for removing/solving an irritating recurring mod issue, that is an indicator that displays in the VAB SPH but not once launched. Cheers, my advice, go get your hands dirty it'll make you feel better, hit some stuff with hammers etc, and much good luck Link to comment Share on other sites More sharing options...
Fireheart318 Posted October 22, 2016 Share Posted October 22, 2016 If anyone has an old copy of the 0.90 (KSP Beta) version of the mod, I'd really appreciate it. I just found my old 0.90 copy in the back of my hard drive Link to comment Share on other sites More sharing options...
lo-fi Posted October 22, 2016 Author Share Posted October 22, 2016 Thanks everyone. Building a jet engine out of a truck turbo, spanner. About the only thing keeping me sane... Link to comment Share on other sites More sharing options...
Recommended Posts