Jump to content

RyanBrian

Members
  • Posts

    5
  • Joined

  • Last visited

Reputation

2 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you so much! Been having a blast with it, and I've got a couple of project ideas I plan to explore. There are edge-cases aplenty at the moment, and I'm painfully aware of the shortcomings of Kepler's Equation haha
  2. Hey! If you're interested, I kept running with the idea Web is certainly not my intended target, but I figured I'd slap a pause menu on, rig a rough input model in, and build to web to showcase some of mechanics discussed here. Be wary if you test it out, the Kraken here is far more aggressive than KSP's.. Hosted on my github site: https://rtoole13.github.io/Orbital/
  3. Sorry for a month delay in getting back to you, but thanks for the input! There's some awkwardness in what I want, as I want to be able to make use of Unity's rigidbody physics for things like collisions ultimately, but otherwise defer to deterministic updates when not subjected to forces beyond a single gravitational influence. I've got decent agreement b/w the FixedUpdate() gravitational force update and the deterministic Kepler problem update now.
  4. Thanks for the reference, and the info! Yeah I might've rushed to posing this question without thinking much on time warping.. Without the deterministic approach, it'd be real tough to maintain stable orbits at real time and 1000x time, heh.
  5. Hey all! New here, and I apologize if this is either posted in the wrong place or if there's existing thread about this topic already. I'm curious if the devs have shared anything about what the physics updates look like for bodies in KSP, given the nature of Unity GameObjects, Rigidbodies, and the FixedUpdate and Update methods. I've been developing a simple 2D orbital mechanics game/sandbox for fun, in part to revisit classical mechanics concepts that I'm sadly far out of practice with, and it's raised a number of questions! My original assumption was that bodies in KSP simply have one gravitational force applied to the body by means of the Unity-built-in Rigidbody.AddForce(<gravitational_force_applied via other body>) in a body's FixedUpdate() method, but given the 2-body nature of the game, this isn't necessary, considering such a system's deterministic nature and the ability to easily calculate elliptical, parabolic, or hyperbolic trajectories from just the masses, relative position, and relative velocity of the two bodies. In setting up some mechanics where I apply appropriate forces in the FixedUpdate() method, while also calculating a given orbit's semimajor axis, specific angular momentum, eccentricity vector, etc. in the object's Update() method, I've noticed that my parameters that ought to be conserved (e.g. specific angular momentum, specific orbital energy), are not quite as conserved as I'd like them to be. I'm certainly not expecting perfection here, but the experience has mainly further amplified my appreciation for the physics of KSP.. The stability of orbits over time is fantastic! It has me wondering if, when a body stops accelerating by anything BUT gravity (i.e. we're not thrusting or interacting with an atmosphere), an equation for an ellipse/parabola/ hyperbola is determined and parameterized, and the body is then just updated along that path until some additional force outside gravity is applied. Again, I'm new here so I apologize if this is common knowledge or well-documented, but a cursory search didn't lead me to anything, so I'm curious. Thanks for any information!
×
×
  • Create New...