Jump to content

How does KSP do physics between parts so smoothly?


ThaHypnotoad

Recommended Posts

We may notice that sometimes no matter how many struts we put our rockets are still wobbly.

I've been working on something of my own that requires physics and found that Unity's joint system doesnt quite work as expected, with "fixed" joints sliding around and such.

I noticed that KSP seems to have solved the problem of connecting separate rigid bodies together and I wanted to ask, did the team:

1,) somehow implement Unity's joint system such that it would... well... work?

2,)make their own system for connecting components? In which case I was wondering if it was possible to get some insight into how it works.

Link to comment
Share on other sites

Well ... it hasn't always been like this. 0.23.5 was where joints were really solidified, before that putting too much weight on the engines of a rocket would cause them to slide around in ways that didn't seem so natural (which, IIRC, is why launch clamps exist at all).

There's some dev notes on it buried somewhere, can't find them for the life of me though.

Link to comment
Share on other sites

(Also a Unity dev)

At one point I solved this by using a Hinge Joint instead of a Fixed Joint and just setting its properties so that it doesn't actually hinge at all. Hinge Joints are just plain better....

This was many moons ago, I can't say whether that's still the case.

Edited by StarManta
Link to comment
Share on other sites

You could look into the Kerbal Joint Reinforcement code. If you look back to a version of the code from before 0.23.5 you'll see what the devs did in 0.23.5 (AFAIK they did the same things that Ferram figured out in order to reduce the wobbliness). Looking at the KJR code anyway might give you some ideas.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...