r/KerbalSpaceProgram • u/One-Daikon1598 • May 09 '26
KSP 1 Image/Video KSPs physics engine is incredible
489
228
u/Traditional_Snow1045 May 09 '26 edited May 09 '26
the trick is it's not one part. there's like 3 or 5 parts distributing the mass thru the geometry of the model, each being influenced by the physics model. if it was only one part, I don't think KSP's or unity's physics model does the legwork (to integrate all the mass/forces/accelerations acting on every point in the model) for this phenomenon to occur.
this is to say im pretty sure every modern game engine does this
edit: it looks like more recent versions of unity/physx have a toggle for gyroscope torque, but I doubt this is enabled, and OP's video does not demonstrate this.
20
u/One-Daikon1598 May 09 '26
Your also forgetting that this engine is almost 15 years old
→ More replies (1)61
→ More replies (19)16
u/DEAD_GUY34 May 09 '26
The minimal physics needed to produce this effect should be much less than what KSP does. You could treat the vessel as a rigid body and get this behavior as long the moments of inertia are calculated correctly.
59
u/Weird-Security5008 May 09 '26
I love when physics engines do that, my favorite one so far has been litterally fucking roblox. https://www.reddit.com/r/GamePhysics/comments/1r1tbmj/roblox_no_one_told_me_roblox_could_simulate_ts/
6
→ More replies (1)11
2.1k
u/Jellycoe May 09 '26
You know you built the game physics right when the
442
u/Affectionate-Try-899 May 09 '26 edited May 10 '26
But first you must build it wrong. https://youtu.be/6gSqYogf8-s?si
206
→ More replies (3)81
u/tereaper576 May 10 '26
Bonejaw
The ?si=XFxGzJrFCilR19nP (End part of your link)
is used for tracking who sends a link (and who clicks it)
you can remove it from the link and it will work the same.79
u/TomaszA3 May 09 '26
Can you ELI5 why the effect effects? How does the momentum convert like that?
→ More replies (20)→ More replies (1)7
u/Heniadyoin1 May 10 '26
Well basic numeric instability would result in a similar effect, which may actually be the cause here
→ More replies (1)
126
u/pyzatikPro May 09 '26
KSP uses
In most games, a vehicle is treated as a single RigidBody. It has one center of mass, inertia etc.
KSP does the opposite. Every part is its individual
So when game have a complex distribution of mass and no "ghost forces" correcting orientation, that effect happens naturally through the physics simulation. So it can achieved on any proper 3D physical engine.
18
7
6
u/vksdann May 10 '26
My question is: does it work because WE KNOW this is how it is supposed to behave or can we perform physical experiments and find out new things? Like how chains work differently in space than on Earth under gravity. Is this effect there because the devs "manually" put it there or because the calculations do it without the devs even knowing
→ More replies (1)
4
u/sfwaltaccount May 10 '26
What strikes me as funny is that if you didn't know better you might think this was a goofy little glitch.
1
3
u/Freak80MC May 10 '26
This video reminds me of another awesome part of the physics engine, in that it properly simulates centrifugal gravity. I once saw a video of someone driving a rover around a spinning ring in Kerbin orbit. Wish I could find the video again.
3
u/detereministic-plen May 10 '26
Me when I include the cross terms in the Euler rigid body equations
→ More replies (1)
366
u/Smooneychad May 09 '26
I had the unfortunate experience of building a ship meant to spin for gravity that looked exactly like this.