Subliminal
Bugsmashers

Star Citizen: Bugsmashers! - Sticking the Landing Gear

14 March 201800:10:12250 linesWatch on YouTube ↗

Transcript — every row opens the video at that moment

  1. 00:00:16

    Everyone, welcome to Bugsmashers. I'm your host, Mark Abent. Let's get smashing. Bugsmashers! Hey everyone, we're here in my fun little test mark level. And I'm going to hop right in. Spawn into my fun little Gladius. Go to third person cuz I, well, I like seeing my ship. And we're looking at a bug with the landing gear today. Specifically, when if you open and close them a few times, they just stop working. It takes a little bit for it to happen, about two to three tries. Um as it open and close, we are going to look at the debug output of the landing gear to see what's going on. So, here, we have the Gladius, and this shows all the information from Mannequin, and you'll

  2. 00:01:04

    see landing gear, landing gear front, landing gear left, landing gear right, and the green little letters that say landing gear compress. Um the landing gear is out right now, so it's playing the compress animation. So, when I hit the surface, it will react to the ground and go up and down. And if I deploy, you'll see that it plays a bunch of animation and sounds indicated it's deploying and retracting. So, it looks like it's working correctly from here. And still deploying. Cool, it's still not broken. Let's see if this breaks it. Ah, we broke it. So, now it's trying to extend, as you can see, and it snaps. And then it retracted, and the animations is all sorts of funky right now. And of course, we have the broken state.

  3. 00:01:52

    Well, unfortunately, Mannequin is indicating that some it's it's to do it, which means this is happening at a deeper level. Mannequin is on So, you have the game code side, then you have mannequin, and then you got to go one higher, which is the animation system. So, I'm going to turn off the mannequin debug. And I have another CVR here that allows us to display all the animations presently playing in very back end of the animation system. And as you can see here, all in pink, um there's like the first few or I should say number the first three up in here have 1 2 3 4 5 6 7 animations on each of them. So, each of the landing gear are trying to play

  4. 00:02:40

    seven animations. And what this tells me is the animations are never getting cleared from the animation system, which is a huge problem. So, if I pop back in, spawn to a gladius, you'll see that all three landing gears on the top are playing landing gear extracted animation. As soon as I open it up, it should have cleared that old extended one, and it's playing another one. So, the animations are playing on top of each other, and that's why we're seeing the snap. So, eventually they build up and build up, and it can't overcome and they kind of overwrite each other, and things just go mayhem. Uh so, let's pop into the code. So, here's our landing system. This is the game code representation of opening and extracting. And unfortunately, the

  5. 00:03:28

    bug isn't happening in here, but this was the first point of contact to see what's happening. And the landing gear, the way that they're devised is you have the ship and then the landing gear underneath it. So, when we process our animations, we go ship level, then the attachments, which is the landing gear. And so, when our ship wants to process um the attachments, uh the landing gear will call this bit of code right in this section to finish its animation. So, the vehicle will animate, then the landing gear will animate. Uh, so if I put a breakpoint right here, yep, hop back into the game, spawn into a Gladius. We're going to hit this a few times. Let me disable it. Woo! Go back to awesome third person. And now I'm going to put a breakpoint

  6. 00:04:18

    back in here. Now, what's supposed to happen in here is the landing gear will come, uh, come in here. It will finish off the animation and then call this finish animation computation, which should then run a bunch of information in here to sync the physics of the landing gear up and to basically clear out all the old animations that were getting hit. So, we're going to get called a few times. So, let's do something interesting. We're going to put a breakpoint right here. Woo! Breakpoints are awesome. Cuz I have a suspicion when we get into here, our landing gear isn't clearing the animation. And

  7. 00:05:05

    because of that, it must not be getting past this point. Hence, I'm going to install a debug break to get this reaction to see what's happening. So, let re-code continue on. So, I added that debug break and as you can see, my suspicion was true. We're hitting this almost immediately. And the landing gear just started coming up. Um, so, what is happening here? Obviously, our animation got told it was done before we could even finish because, let me close this, um, this part's not supposed to occur until we finish this bit. And we're obviously getting out a little bit early. Now, if we go back to this process attachment, you'll notice here

  8. 00:05:53

    when we call finish computation, um we actually go into here, where we will actually call the second bit, and this gets set uh where are you? Uh do do do. So, this gets set when we first start the animation. So, here it is. So, if we want to play to deploy, we'll say that we're going to start up, which means when we got to here, something has told to end. Now, during normal paths of operation, this will this call right here will finish the animation, at which point do do do. Where are you? It will synchronize the thread, finish off, and then say it was done,

  9. 00:06:43

    Uh go back. Go back. Go back. Got to go back. Back. Which means we have finished before we even finished. Uh if we go back into the process attachment, you'll notice here, uh there's a bunch of code that kind of does some extra bit of work that's not necessary. So, all this bit right here is trying to finish the animation thread, and then get it into a state where it's done. However, it's unnecessary because that's exactly what this guy is doing. So, we're essentially doing the pre-work before the actual animation stuff is able to finish. It's some leftover code from back in the day before we, um you know, re-optimized all of this section. So, the reality is, and the fun

  10. 00:07:32

    part of this is to basically go, "Well, we don't need this anymore because finish animation computation will do it all in here." We're going to synchronize the animation, hook up all of the the bone positions, and then say that we're done. So, in the character process attachment, we just let it do its job. And I'm going to re-code. And to recap, the vehicle will animate. It will tell all of its children, including the landing gear, to also animate. It will go into this process attachment. Once the animation is done, it's supposed to finish call this finish animation computation, which cleans up all the animation back-end stuff to make sure the threads are synced up and the animation is, well, completed. Unfortunately, we had some leftover code from back in the day, which did that on

  11. 00:08:21

    top of the new way. And so, we finished all the animation computation, did all the bones and all that stuff movements, and then when we got into the actual new way of doing it, where we need to finish off the enemy computation, then clear off the existing animations, it would never get here. And of course, the easiest way is just remove the old way, let the new way happen, hit re-code, and see what happens. So, let's see what happens. All right, we're back in the game. I'm going to refresh a new ship. Give me my infamous fun Gladius. And now, when we open and deploy, it's playing the extended animation, which is good. And the extended's gone, and now we have just the compress. Let's go back. And it's there. So, now all of these

  12. 00:09:12

    sub-attachments will make sure to clear all the animations, and everything is good. Hope you guys enjoyed. As you guys saw, we had a fun little issue with the animations just never getting cleared from the landing gear, and as a result, when we try to push new ones on there, it just wouldn't happen, and then our landing gear would get stuck, and all hell would break loose. Well, we had to make sure that all the animations got away, and then everything was good to go. Hope you guys enjoyed. Till next time. Thanks for watching. For the latest and greatest in Star Citizen and Squadron 42, you can subscribe to our channel, or you can check out some of the other

  13. 00:09:58

    shows, and you can also head to our website at www.robertsspaceindustries.com. Thank you very much for watching.

Transcript from YouTube’s automatic captions — punctuation and Star Citizen jargon are approximate. The video itself is hosted by CIG on the official channel.

Squadron 42

LiveSQ42 Launch Subathon

$2,094of $3,000

Getting Sub to Manchester for the Squadron 42 launch

Next giveawaySubscriber Store pick
$6.27to go