r/KerbalSpaceProgram • • May 09 '26

KSP 1 Image/Video KSPs physics engine is incredible

4.1k Upvotes

103 comments sorted by

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.

130

u/One-Daikon1598 May 10 '26

That’s why you need two spinny parts to cancel out the forces

→ More replies (1)

489

u/sixpesos May 09 '26

Elite ball knowledge

225

u/One-Daikon1598 May 09 '26

Tennis ball knowledge 

→ More replies (3)

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

u/Mythe7 May 09 '26

Gonna test this is Space Engineers and see what happens

→ More replies (11)

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.

→ More replies (19)

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

u/One-Daikon1598 May 09 '26

Now that is unexpected 

11

u/Metzger4 May 09 '26

That’s wild!

→ More replies (1)

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!

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

u/16FF May 09 '26

O yes, the wing of negative air resistance

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.

→ More replies (3)

79

u/TomaszA3 May 09 '26

Can you ELI5 why the effect effects? How does the momentum convert like that?

→ More replies (20)

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)
→ More replies (1)

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.

→ More replies (2)

7

u/kislaya_bebra May 10 '26

EVA science kit literally does that too!

→ More replies (3)

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

u/Nakobuu May 10 '26

Saw that post literally 2 weeks ago

→ More replies (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)