-
Posts
1,245 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by OrbitusII
-
8/10 I see you fairly frequently
-
New Contract Types: Satellites
OrbitusII replied to MattW93's topic in KSP1 Suggestions & Development Discussion
This could be cool, I support it! -
I would have done an overhead view at a higher speed, with some tilt-shift if possible. Otherwise it looks cool!
-
It can use Unity animations or animations bundled with the model itself, all the code needs is for the animation to be attached to the animated object. That is correct, the compression of the wheel collider's suspension does indeed drive the animation. It uses an indirect method to do so, but that is effectively how it works. The script casts a ray down from the wheel collider to the ground, returning the data it gets if/when it hits something. It then takes the distance from the point the ray hits to the maximum extension of the wheel collider and turns that into a percentage value based on the "compression" variable in the script. This percentage value is then used to set the time of the animation. For example, when the suspension is completely compressed, the animation will go to time 0. When the gear are off of the ground and completely uncompressed, the animation goes to time 1. Based off of the compression experienced by the suspension on the wheel collider, the animation can therefore be anywhere within times 0 and 1. In addition to using the data it gets from the raycast to set the time of the animation, the script uses the point hit to set the position of the GroundContact object's Transform component. This is similar to how the stock wheels do it, except that the stock wheels position their wheels at the hit point plus some extra height based off of the radius of the wheel. AALG places the GroundContact object directly at the hit point, simplifying code a little bit. The original code for the AALG would use the same method as stock wheels, which worked for simpler models like the 747 landing gear but quickly fell apart as soon as something like Capt Kipard's landing gear came along. The current code is slightly harder to set up in Unity in terms of positioning things (like you need to know the radius of the wheel meshes), but it's actually a lot better in terms of accuracy. wheelBase.position = hit.point+(wheel.radius+heightOffset)*wheel.transform.up+(perc*traverse)*wheel.transform.up; //Complicated, ugly, and not always accurate, especially with things other than the simple 747 gear I designed for testing this. //Doesn't always position things right, even if they're set up 100% correctly NEW: groundContact.position = hit.point; //Very simple and elegant. Works like a charm for anything, even if it's not set up 100% correctlyOLD: Needless to say, the original code was very convoluted and will not be used in the final plugin. The new stuff is awesomely simple. Just look at the hierarchy needed to get it to work! It can work satisfactorily with only the main parent, WheelCollider, and GroundContact objects! Now that's simple setup!
-
Update video! Got Capt. Kipard's Skylon landing gear configured! The gear here are dropped from about 10 meters up with a low spring setting to show the full compression. The animation on the torque links needs a little refining, which is why I included footage showing the gear working without animations (the old code could not do that) as confirmation that you can still use FXLookAT or whatever.
-
I agree, and when you do things right the results are awesome. Ended up rewriting the code for the landing gear and the results are much better. I don't have positioning issues any more and setup is a lot more intuitive! I'll keep working with this iteration of code. Update: Really glad I rewrote the code! I'm now able to set up Capt. Kipard's prototype gear with no trouble whatsoever! It's a little confusing to animate but that's a small price to pay for the massively improved functionality! I'll try to post a progress update sometime today.
-
What I'm thinking of doing is making the plugin for KSP and then releasing some tools for setting up the gear in Unity. This all depends on whether or not I can make it easy to configure of course, and my attempts with landing gear besides the 747's have not gone well, unfortunately. For some reason the gear I've been trying to set up are not cooperating with anything I do to them, so there will probably be a rewrite of the code soon.
-
Update: Finally got the highlight from a couple days ago uploaded to Youtube, here it is! I've got some work to do in terms of reworking some of how the visual suspension operates. After my trouble setting up Capt. Kipard's prototype gear I realized that how I'm handling bogie position is not quite right and needs to be fixed. Working on it right now to fix that issue.
-
All the spring constant is is the amount of force stored in a spring when it is stretched or compressed. If the spring constant is higher, it takes more force to stretch or compress the spring. In Unity, the spring constant for a wheel collider is stored in the "SuspensionSpring" variable, so it can be changed to be higher or lower depending on the needs of that collider. In the case of the stock landing gear, their spring constant is so high that the landing gear don't compress enough to be useful as shock absorbers. All I'll be doing is keeping that value lower on the 747 landing gear so that the gear compress and absorb some of the impact. It will still be a variable that can be set when configuring the gear in Unity though.
-
Alright boys I need your thought on this one... Bagels...
OrbitusII replied to xoknight's topic in The Lounge
Gotta get me that Sweet Cinnamon, toasted to perfection, smothered with cream cheese... Ain't nothing better than that (besides maybe a nice homemade breakfast sandwich) -
I think I understand what you mean... This might be good for a base-leveling system to make things face straight up even when the ground doesn't. While that would be cool, and I'll consider it for later, such functionality is unfortunately out of the scope of AALG at this time since it's focusing on aircraft landing gear and not base construction. Don't worry, I'll keep this in mind for when I do expand into that area.
-
LLL - Lack Luster Labs - Development Thread
OrbitusII replied to Lack's topic in KSP1 Mod Development
Hilarious I think having some more train traffic would be nice. It's either sitting in the station or gone for most of the time. I like watching it pull into the station but having more train traffic would make it easier to watch it leave, which is what I really want to see. -
"Pusher" engines? sorta like maglev?
OrbitusII replied to Rivvik's topic in KSP1 C# Plugin Development Help and Support
It would require some raycasting but yes, something like this is possible in Unity. It would function pretty similarly to a wheel collider, I think. -
This isn't so much an expansion if the stock landing gear as it is a complete rewrite, but it adds support for more complicated gear "physics," i.e. animated gear compression. That's a good way of looking at it though. Edit: one thing I am planning on doing vastly differently from stock gear is reducing the spring constant. Stock gear (and firespitter) are effectively rated for 100+ ton crafts, since if you look at them when landing there is virtually no compression. IRL, the purpose of landing gear is to soften landings and support the craft when it is on the ground. If the gear don't compress at all, the full force of the landing impact is transmitted to the hull, potentially damaging critical structural components.
-
Your puny rocket will never catch the SR-71!
-
Ah, sorry about that. I'm not totally used to talking a lot on stream so I talk when I try to explain what I do. Oh, the curses of being an introvert... Anyways, got landing gear deployment pretty much done! Still gotta get your bit of feedback done, Capt, but that'll be easy stuff to do. I'll highlight and upload the stream to Youtube tomorrow.
-
Working on the Advanced Animatronic Landing Gear plugin tonight!
-
Actually, yes! Something like that would be easy to implement and set up, just bundle it with the retract/deploy animation. (Although it may play out differently in the end) Edit: I agree that there are a lot of animation modules, but each one brings different things to the table and so I kinda like having the variety. We'll see how things play out in the future I suppose.