Jump to content

Engine cluster sticks to ground when using multiple colliders


Recommended Posts

Hi all,

I have a problem with parts sticking to the ground, launchpad, runway or any terrain whenever they are spawned or landed (not -just- on initial spawn/launch, but also if landed manually). The current part exhibiting the issue is an engine cluster for a series of lander parts I'm working on.

When I have a separate collider (box, capsule, or cone-shaped-convex-mesh) for each separate engine the entire part sticks to the ground when launched. If I have a single box collider covering the entire bounds of the engines there is no problem and the part lifts off as it should. During the times when it is 'stuck' I can often use the SAS or RCS to wiggle the vessel a bit and get it unstuck, where it willy promptly shoot into the air as it should given the TWR of the vessel.

I've had a similar problem in the past with other parts and usually ended up abandoning the part (or vastly reworking it) as I could never figure it out, but that is not really an option this time. I've tried various size and shape/type of colliders, but the only thing that seems to work is either removing the colliders entirely or giving it a single collider for the entire part.

Has anyone else seen this issue? Any known solutions (other than single colliders/no colliders)?

Edit/Update:

It has something to do with multiple colliders on an engine that is resting on the ground. If I add other engines to the vessel, they can lift the problematic engine cluster off the ground just fine (i.e. smooth ascent, no sticking or jerking loose). If I use a single collider the problematic engine can lift itself with no problem.

Unity setup:

cRn8nPG.png

Edited by Shadowmage
Link to comment
Share on other sites

Unfortunately I don't have any advice to give, since I haven't run into this. All of my engine clusters use single colliders, but they're closely packed together. I can see why separate colliders makes sense here.

However, what I wanted to make a note of is that there used to be a launchpad bug, in which a lot of the stock engines used to stick to the pad. I think part of it was the spawning height in relation to a poorly aligned launchpad collider. I think that was fixed some time ago, but the solution (from the player perspective) was to simply always use launch clamps, or to place decouplers underneath the engines, so that the engines don't touch the pad.

So I'm curious-- Does the vehicle spawn high enough that the engine appears to be completely above the pad's surface, or does it look like it intersects immediately on physics load?

Link to comment
Share on other sites

If I just spawn the engine it will intersect immediately (and stick with multiple colliders in use). If I use launch clamps and fire the clamps+engine at the same time it will take off like the rocket that it is. If I use launch clamps and let it fall to the ground before firing the engine, it still sticks. Or if I land it on the engine after taking off using launch clamps or wiggling, it will stick. Landing legs exhibit the same symptoms; stick to the ground with legs retracted, and take off just fine with legs deployed.

The previous parts that have had this problem had landing legs involved, and if I remember correctly adding in the landing leg module and wheel collider 'fixed' the sticking issues. One of those parts only had a single engine transform, while the other part had four animated engine transforms. But the one thing that they all had in common was multiple parallel and flat non-animated colliders all in contact with the terrain at the same time. I'll try playing around with the multiple collider setup and see if perhaps rotating or staggering the y-transform a bit will help with the stickiness.

I've also examined every other engine cluster that I had in my fairly modded install, and it seems that every single one uses a single collider for terrain collisions (including stock). A few seem to use non-convex mesh colliders for additional mouse-over interaction on each engine, but appear to use a single collider further up for terrain interaction (e.g. on those the engine bells will fall through the ground). So, perhaps this is a 'known' issue.

I really wanted to be able use a couple/few individual colliders for these pieces, as you are intended to be able to utilize the hollow portion in the middle for additional (smaller) engine clusters or inner stage access. I could perhaps go with the multiple colliders and just put a note in the part description that says to always use landing legs and not land directly on the engines :)

Link to comment
Share on other sites

I really wanted to be able use a couple/few individual colliders for these pieces, as you are intended to be able to utilize the hollow portion in the middle for additional (smaller) engine clusters or inner stage access. I could perhaps go with the multiple colliders and just put a note in the part description that says to always use landing legs and not land directly on the engines :)

Yeah, having to do these kinds of workarounds gets frustrating, for sure. But that's not a bad idea. You could also set the crash tolerance really low to discourage landing on it. :)

It might still be OK to have one big collider that fulls in the empty space. It won't stop you from having an attachment node inside there, and allow players to put stackable parts in that space. It'll just mean that strutting to that space will look ridiculous, surface attach won't work well there, and kerbals won't be able to walk through it, etc.

Link to comment
Share on other sites

The main reason I have it hollow is so that other (ascent stage) engines can have their thrust-vectors/exhaust go through the hollow cutout - if I use a single solid collider, the thrust from upper-stage engines will hit that collider and result in...well... probably explosions after not too long :) The hollow also needs to be...well, actually hollow, as other parts need to be able to pass through the area without collision.

Oh..what I wouldn't give for a game engine that could handle concave colliders properly with good performance. Sadly, I've written my share of collision-detection code, and I know from experience that it is a -very- difficult problem to solve and still have enough performance to work in a game.

I'm still working on trying to find the root cause of the problem... will be trying various different engine modules from other mods as I'm fairly certain that the issue is somewhere in the stock ModuleEngine code (I just don't have access to that source to say for certain, or even offer a solution). In the end I will likely just use some of the aforementioned work-arounds or writing a custom engine module (-really- don't want to...but might have to).

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