Giter Site home page Giter Site logo

Comments (4)

Dunbaratu avatar Dunbaratu commented on August 13, 2024

Would that suggested fix have a problem if the user has manually selected a "control from here" that isn't the same orientation as the first KOS module, and then activates a stage?

The first kos module, by the API's reckoning, might be a rover with a deliberately sideways KOS module on it that wasn't meant to be the module used for flying - it was meant to be used for driving later, so switching to its orientation in midflight when you drop a lifting stage (and therefore you have changed the partcount) could be disastrous.

Presumably the Mod "knows" which KOS CPU is the one on which a program is running. So instead of orienting by the "first" kOS module, how about if the Mod chooses its orienting by "whichever module is the one that's running this "lock steering" handling routine that I'm working on right now."

from kos.

JoCRaM avatar JoCRaM commented on August 13, 2024

It would be predictable in that scenario, when you spawn the vessel, that node fixes the orientation to itself, and every time you stage it refixes.

It wouldn't be as predictable when docking - which module becomes first depends on which the player is "in".

However, you are absolutley right, it's not a good fix. I think the correct ifx is to interrogate the vessel on every boot and part count change, and then transform every thing so that "steering" is always relative to the kOS unit as you suggest - but provide a SHIP:CONTROL rotation (and possibly a SHIP:CONTOL:LOCATION vector) - however this is a somewhat more complicated solution.

from kos.

Dunbaratu avatar Dunbaratu commented on August 13, 2024

Hmm. KOS runs separate code simultaneously on separate modules. I wonder what would happen now without any code changes if you tried to "lock steering to up." on one KOS module, but then tried to "lock steering to north" on another module, and these two different modules are both attached to the same ship at the same time. Which one "wins" that fight?

from kos.

JoCRaM avatar JoCRaM commented on August 13, 2024

they both apply torque based on where they are and want to be - but I unlock steering after docking.

from kos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.