Jump to content

Collision Meshes (no doubt AGAIN)


Recommended Posts

Argh! Seriously running out of hair. Starting to drool a little and dream of meshes. Meshes that don't work and result in crazy crazy stuff from KSP's physics.

What's the secret here? I'm missing something fundamental.

- I get that a collision mesh has to be convex. How the hell is that even possible? I'm making buildings. I need ramps and bezels/bevels(?). How exactly do I avoid concavity?

- I'm currently using multiple meshes applied in Unity to a model. Obviously, when using convex, this will result in some crazy meshes that don't fit a particular part of the model. Because there's concavity. How the hell do you have a ramp or a bezel/bevel without it? I've tried splitting faces, I've tried this, I've tried that. And the other. I'm drooling again.

- I keep seeing "use a single mesh for collision set to convex" or some such. Wait what really? But I have concavity in my model.

Any help/guidance/links on this crazy collision mesh insanity welcome.

Link to comment
Share on other sites

You forgot one gigantic point: buildings ARE NOT parts !

I don't use convex collider with all of buildings I've made*, no issue from now, they behave exactly like stock buildings and terrain.

Look at my stunt ring, no convex collider, plane or anything can go through it, but crash on the "walls".

If you really want convex collider: split split split and split ! But it will become a nightmare very fast (I split my first new robottom version into 18 convex colliders, FPS was already killed in VAB !)

*except the WIP CFA runway, but perhaps not in the lastest released version

Edited by Justin Kerbice
add CFA note
Link to comment
Share on other sites

use primitive colliders for building, stairs, etc. Convex mesh colliders are for complex shaped meshes that require physics interaction with other mesh colliders. non-convex mesh colliders will work fine with other primitive colliders.

Edited by nli2work
Link to comment
Share on other sites

I build one single object as complicated as I can imagine/made, drop it into unity, ask it to add collider, don't check "convex" and export.

(I guess static thing make it more unity-friendly than parts, fortunately.)

So a single material on a single mesh. I'm not having problems with basic models like that either.

Link to comment
Share on other sites

use primitive colliders for building, stairs, etc. Convex mesh colliders are for complex shaped meshes that require physics interaction with other mesh colliders. non-convex mesh colliders will work fine with other primitive colliders.

I'm actually dealing with fairly complex meshes even though I'm just making buildings, so unfortunately primitive colliders aren't all that useful :(

Link to comment
Share on other sites

yeah Justin is right, if your vessel has convex collider then the building doesn't require convex collider. Only 1 of the 2 colliding mesh colliders has to be convex. you can just model your building and apply mesh collider and use the building mesh as your collider mesh.

Edited by nli2work
Link to comment
Share on other sites

Some improvement on the latest test. As you guys suggested, I went with a second mesh with a single material as one collider on the model. It is behaving waaay better although there are still physics issues where a vessel comes in to contact with a 'concave' part of the building, such as where a sloped verge meets a wall.

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