Jump to content

[modding] Better and more colliders management


Recommended Posts

Hi modders or everyone else,

I don't think regular users may have some interest here as it purely wha we can't do know with KSP/Unity due to over limited colliders as highlighted here.

Convex shapes may have been good enough in the past, when only cylinders, cones, bells and some boxes are enough, but this limit is a so big constraint that we can't do more various and interesting shapes.

So, I ask here if there is any tiny little chance in a close future we may have more freedom in shape design without the fear of encountering various random crashes of the game in a quite unpredictable fashion ?

For the record, I have play with non convex colliders on my Rover 'N' Others parts set, set allowcollision to true also and creating some assembly with them works, playing around is ok. But next time when loading a save game which have various vessels built with such parts lead to crash (the VAB/SPH scene is very very very slow, so slow that sometime unity engine is stuck and windows claim the game doesn't respond), in the log, there are plenty of line like this:

NullReferenceException: Object reference not set to an instance of an object

at Part.OnTriggerStay (UnityEngine.Collider other) [0x00000] in <filename unknown>:0

(more than spamming in fact)

And many time games just decide to crash without such slowdown.

Also, such crashes appears when I use multiple convex colliders on a part created with many meshes.

So the choice we've got for now is:

-using 1 single damned convex collider and having ridiculous parts which work "well",

-using more convex colliders or not convex ones and suffer from random crashes, but with nicer parts

By the way, stock parts colliders are really bad (when they exists, z400 battery is weird when trying to put a small solar panel on it) and have to be improve (flat parts are "inside" the tank for example without mentioning the weird angle with symmetry).

Thanks for reading.

Link to comment
Share on other sites

Thing is, non-convex collisions are hard. Hard enough that the engine might well be secretly slicing your non-convex collider into one or more convex colliders to do the math with anyway. This I'm not sure about, what with not having Unity to play with.

Does seem strange that you have crashes just from using multiple convex colliders though. That a Unity bug, or a KSP bug?

Link to comment
Share on other sites

Thing is, non-convex collisions are hard. Hard enough that the engine might well be secretly slicing your non-convex collider into one or more convex colliders to do the math with anyway. This I'm not sure about, what with not having Unity to play with.

Why should be such hard as you think ? a convex box collider can collide a convex sphere one on some angle which will be similar to a non convex collider hitting something like terrain.

Does seem strange that you have crashes just from using multiple convex colliders though. That a Unity bug, or a KSP bug?

Who knows ?

And as mod = "not a Squad business" there's almost not a chance such issue will be seriously investigated 'til someone at Squad create such a case.

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...