r/KerbalSpaceProgram • u/One-Daikon1598 • May 09 '26
KSP 1 Image/Video KSPs physics engine is incredible
Enable HLS to view with audio, or disable this notification
4.1k
Upvotes
r/KerbalSpaceProgram • u/One-Daikon1598 • May 09 '26
Enable HLS to view with audio, or disable this notification
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.
489
u/sixpesos May 09 '26
Elite ball knowledge
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.
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/
2.1k
u/Jellycoe May 09 '26
You know you built the game physics right when the Dzhanibekov effect just happens on its own. Cool demo!
126
u/pyzatikPro May 09 '26
KSP uses NVIDIA PhysX (Unity's default physics engine), and almost any game built on it can achieve similar results. The difference is how KSP handles the hierarchy.
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 RigidBody, and they’re all held together by Joints(and that's reason why ships in KSP are quite wobbly, especially during physics warp).
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
u/Far-prophet May 09 '26
Yo-yo de-spin stabilization works too.
7
u/kislaya_bebra May 10 '26
EVA science kit literally does that too!
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
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
u/Nakobuu May 10 '26
Saw that post literally 2 weeks ago
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
2
u/AbacusWizard May 10 '26
I frequently do this for fun IRL whenever I happen to be holding an unopened block of cheese. Toss it with a rapid spin around one axis, it spins smoothly. Around another axis, still spins smoothly. Around a third axis, it wobbles as it spins!
2
u/Stained_Class May 10 '26
Bob thought EVA Experiments Kit were not big enough, so he asked for this.
(using an Experiment Kit in space has your kerbonaut showcasing the exact same effect with a wingnut)
1
u/edintheedin May 09 '26
oo very nice
1
u/Perfect-Assistance52 May 10 '26
If you throw some pistons with weight on the end and extend them while rotating, your craft will conserve its angular momentum, too!
1
u/MostLikelyUncertain May 10 '26
Physics model of the Create Aeronautics mod replicates it aswell.
1
u/FlightSimmer99 Colonizing Duna May 10 '26
its not but it is cool tho
1
u/Space_Slav07 Valentina May 10 '26
I still don't understand why that effect happens.
1
u/Aleskey_Mijaylob May 10 '26
BRO.
1
u/chrisvdmeer May 15 '26
Still better then Raygun
-11
u/OkFly3388 May 10 '26
<GAME_NAME> GAME HAVE COOL GAME ENGINE. No, they did not, its not their engine, stfu, stop this bs.
In case of KSP it just physx.
I hope that people learn, that ALMOST EVERY game use already EXISTING physics engine rather of making own from scratch.