Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Hanger Door + Landing Gear = Retractable Landing Gear?

Discussion in 'Suggestions and Feedback' started by erdrik, Oct 6, 2015.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. erdrik Apprentice Engineer

    Messages:
    229
    Hanger Doors seem pretty stable and solid when it comes to extending and retracting.
    I admit I don't know how the code is set up, but if you could add the Landing Gear's locking functions with the Hanger Doors extending and retracting(and ensure the locking point moves properly), I would imagine it would make the concept of retractable landing gear more stable?

    Just a random thought I had while working on something else, and I thought I'd share.
     
  2. Legas Trainee Engineer

    Messages:
    51
    Yeah, if it's possible it would be great to have a retractable landing gear without the use of wonky pistons.

    The magic behind the Airtight Hanger Door is that it's not a moving block. If you look closer, the hitbox on it hints that actually the block is full sized. There is no separate grid like the piston. That's why it works without randomly exploding or wrecking everything.
     
  3. erdrik Apprentice Engineer

    Messages:
    229
    Thats for placement tho. Objects can move through that hitbox just fine once it is placed, so all you would need is a separate rotor or piston door if you want to enclose it when retracted.
     
  4. Sarekh Senior Engineer

    Messages:
    1,177
    would prolly not work on voxels, though at the current state of the game. I tried using Airtight doors as Pistons for a landing ship and the extended doors just passed through the asteroid I was trying to land on...
     
  5. erdrik Apprentice Engineer

    Messages:
    229
    Were the hanger doors in the middle of extending when they made contact with the asteroid? or did they just always pass through?(mid extension, closed, and open)
     
  6. Leadfootslim Senior Engineer

    Messages:
    1,300
    I'd love to have this, but if modders haven't found a solution I don't have a tremendous amount of hope. I suspect a fair amount of cheating is involved to make the doors behave as nicely as they do for their intended purpose...However, I'd like to point out an encouraging interaction - I have a merge-block docking setup in which two hangar doors extend to make it an airtight seal. It explodes if you unmerge without retracting them, but works flawlessly when they are closed.

    If the game treats extended doors as properly "solid" objects, we could luck out and find that something like this is possible.
     
  7. Braxbro Junior Engineer

    Messages:
    637
    Look guys, how about you go deal with the devil and use pistons and rotors. They actually are much more stable now as long as you don't try to do unreasonable things with them (a.k.a. Make a giant reaction control wheel system that works, or make robots that throw warheads at 104.4 m/s). Retractable landing gears are easy, but space consuming. Like real life.
     
  8. erdrik Apprentice Engineer

    Messages:
    229
    How about you stop dumping on peoples suggestions in the suggestion forum.
     
    • Like Like x 2
  9. Braxbro Junior Engineer

    Messages:
    637
    Lol I'm just saying, it's not an absolute first priority.... My fighters don't even have landing gears. My bombers sometimes have fixed ones, and my gunships have fixed ones or sometimes very small retractable ones. I'll see about whipping up a blueprint for you and putting it up on Dropbox or something...
     
  10. extraammo Senior Engineer

    Messages:
    1,015
    Doors work by not being separate grids. They are directly position rather than physically constrained. As such, making a grid extension on such a system is possible but has consequences. Door motion isn't physically determined. The code basically says, "Put door here." instead of, "Push door here." which is a huge difference. You could, however have a retractable landing gear that is required to be disabled while extending or retracting.
     
  11. erdrik Apprentice Engineer

    Messages:
    229
    Where did I ever suggest it was a 'first priority'?
    Where did I ever imply I didn't know how to use pistons with landing gear?

    You continue to dismiss the suggestion by implying I should just use existing tools, when the whole point of the suggestion is to add a new tool.
    If you have an actual criticism of my suggestion then post it, otherwise I would ask that you stop trying to deflect the thread off topic.


    Thats is usually not an issue. All that means is that the lock position would need to be attached to the mobile part of the door.
    This is done extensively in nearly every 3D game out there via skeletal or relative attachment programming.
    I don't know how SE's code is set up, and its true there might be some issues with implementing it on this specific block.
    But don't the Turret blocks already make use of skeletal attachments? (Ive not done any modding at all so I don't know for sure)

    That said I don't have a problem at all with my suggested land gear only being able to lock while in the extended position.
     
  12. extraammo Senior Engineer

    Messages:
    1,015
    I'm not sure that you fully understand what I am saying. The fact is, in order to have no vibration or jitter on a moving part, it has to have its location set as an offset of its parent. This means that it will phase through any obstacle that might be in the way of its range of motion. Because landing gear performs this sort of parenting as well, you would end up with the attached ship phasing through anything in the way during extension. I'm only addressing the issue of attached objects during extension of the landing gear that occurs because of the mobile being moved by changes to its transform instead of by forces.
     
  13. Mr Ixolate Apprentice Engineer

    Messages:
    276
    And yet this isn't the case with hangar doors? Not sure exactly what you are saying here.

    Surely at least some of these issues could be averted by making the landing gear unable to lock when retracted or moving?
     
  14. erdrik Apprentice Engineer

    Messages:
    229
    Yes, thats what a relative attachment is. A skeletal attachment is the same except the parent is a bone in the skeleton.(which when animated will cause the attached object to follow that specific bone)
    Uh, no. That only happens if the collision code isn't fired for attachments, or if it doesn't account for unmovable objects.
    And unmovable objects are very rare in SE. Literally just stations and asteroids. Everything else has a free floating grid that the collision can transfer
    the impact into to create motion. And even stations and asteroids are modularly destructible so the colliding bits can break off instead of phasing.

    Its not the fact that it is attached that prevents collision, but an additional piece of code that prevents collision when attached.
    Or at least thats how most code Ive seen does it. As I said I don't know how SE's code is set up, but it makes sense that this is what they did.

    Basically I think its not that attached objects can't collide with things, rather that Keen has turned off collision for attached objects.
     
  15. Braxbro Junior Engineer

    Messages:
    637
    No they use a spherical hitbox on top of them to not allow the wierd jamming urself inside the turret barrel / impaling urself on it.
     
  16. extraammo Senior Engineer

    Messages:
    1,015
    Alright, let me try this again. When you move an object with a collider by directly changing its position to a new location (which is done via animation) it is NOT able to slow down when coming into contact with another collider SINCE it does not have a momentum or any physics independent of its parent. This may not be a problem when it's a small object that is being animated very slowly. However, if it is a landing gear, which has been changed to use parenting (hence the lack of jittering now), you would be animating a way larger object.

    This is the reason pistons do not work the same way as hanger doors. Pistons use physics to move a grid which is a rigidbody with a collection of colliders. Hanger doors move a collider that is part of the rigidbody (grid) that the door is on.
     
  17. Mr Ixolate Apprentice Engineer

    Messages:
    276
    Thanks for clarifying that.
     
  18. erdrik Apprentice Engineer

    Messages:
    229
    Every form of movement is done by directly changing its position to a new location.
    The only reason an object has momentum during normal movement is because it is tracked in the code between each position change.
    This is why, and is clearly evident through play testing, there is phasing during very high speed collisions.
    The code handling momentum tracking has an upper limit of "distance of position changes" that high speeds will break.
    (it becomes an issue of how much CPU resources you want to dedicate to predicting where things are at range, which I imagine gets very costly the bigger the grid)

    The only reason animated motion wouldn't have momentum is if the momentum isn't tracked during the animation frames.
    Im not saying it does in this case, just that it would be possible to track momentum during these frames.
    If a grid is locked to "animated landing gear" the grid tracks location data and previous location data per tick and calculates momentum as normal.
    In theory it shouldn't be any more costly than normal movement, since the animation wouldn't be going that fast any way.
     
  19. Braxbro Junior Engineer

    Messages:
    637
    In correct. With doors it instantly sets the door collisions to "closed" and activates the close animation. Pistons and rotors do not do this. They move separate grids; there fore this is impossible. Done.
     
  20. extraammo Senior Engineer

    Messages:
    1,015
    I'll try again since you seem bent on reading my words as an argument rather than FACTS ABOUT HOW SE HANDLES ITS OBJECTS.

    The door does not use the physics engine for motion.
    Pistons use the physics engine for motion.
    Moving big objects outside of the physics engine creates buggy physics interactions.
    Making retractable landing gear work using the method that doors use would result in moving large objects outside of the physics engine.
    Period. Final. That's it. This isn't up for any sort of debate. This is how the engine works.

    THAT BEING SAID, this doesn't mean you couldn't have retractable landing gear, but instead they could only be attached when NOT extending or retracting.
     
  21. erdrik Apprentice Engineer

    Messages:
    229
    Why is your word, the word of god on the SE engine? Where did you get these facts?
    Obvious. I am not claiming otherwise.
    Obvious. I am not claiming otherwise.

    But whether movement occurs through a calculation from a physics engine or through a position change via animation, doesn't change that at the core it is just a direct change of position between ticks/frames.
    Is it really that hard to imagine calculating a velocity from "position of previous animation frame and position of next animation frame" and then inputting that along with the mass and center of gravity data of both grids into the physics engine to get the new momentum and velocity data for the two grids?
     
    Last edited: Oct 15, 2015
  22. extraammo Senior Engineer

    Messages:
    1,015
    I've actually worked with a few physics engines myself and am developing a sim game. So these facts actually come from a couple years of experience.

    The change in position is the final result. Animating colliders, like hanger doors do, cuts out the physics engine's job of managing REACTIONS. The result is that the door cannot be slowed or stopped by anything. Its motion is defined, not calculated. Doors have INFINITE strength as far as the physics engine is concerned and that is dangerous.

    Stop trying to argue with facts I am sharing with you. I'm not attacking your idea, I'm just letting you know the limitations of the engine.
     
  23. erdrik Apprentice Engineer

    Messages:
    229
    I am aware that an animated motion is defined, and essentially unstoppable.(unless the engine allows direct control over the animation frames)
    But doesn't that only matter if the block doing the animation is static or connected to something that is also static?
    If it is attached to a free floating grid(like most situations in SE) is it not possible to translate the desired change in velocity to the grid the animating block is attached to?
    I mean even if the animated motion is unstoppable its still essentially two free floating objects imparting forces on each other.

    1: Experience != Fact. Especially when Experience == Different Engine than what is currently being discussed.

    2: Im not trying to argue with you. I trying to figure out where your getting your info from and why you claim them as unchanging facts.
     
  24. Bumber Senior Engineer

    Messages:
    1,018
    What you get is basically a piston, with mostly all of the same problems (and probably a few different ones.)
     
  25. extraammo Senior Engineer

    Messages:
    1,015
    When you animate colliders directly the physics engine doesn't track the position change or velocity. Since it isn't moving it, it doesn't perform the collision checks and the collider is free to phase through other colliders. Also, coslty calculations like center of mass would have to manually updated each animation frame. Since the connected moving piece doesn't have it's own rigidbody it imparts zero force on its parent.

    Animating a collider is identical to changing the collision geometry of the rigidbody. The physics engine does not see it as pushing, pulling, or any sort of motion. It sees it as the way things are and it has no idea that it was different before.
     
  26. Veritas Apprentice Engineer

    Messages:
    143
    ARISE FROM THE GRAVE AND SERVE ME!!!! /evilnecromancervoice
    So, I thought about this today while thinking about one of @Xocliw 's recent streams where retractable landing gear were discussed offhand. (Sidenote: Is there any particular reason why retractable hangar doors are so much more stable than pistons and rotors?) Since hangar doors are so much more stable than pistons and rotors, would this idea of using them as the base code for retractability work in creating retractable landing gear?
     
  27. Thales M. Senior Engineer

    Messages:
    1,001
    Why not making pistons and rotor as stable as hangar doors? Pistons and rotors may have locked status when moving & rotating. So the ship will have one center of mass all the time.
     
Thread Status:
This last post in this thread was made more than 31 days old.