Jump to content

Help! New made part falling through the floor, everything else works fine.


Recommended Posts

Hello fellow KSP addicts and helpfull modders(sucking up at the beginning! :P).

I have a little problem and can't find any post concerning the same issue.

I designed a part in Blender. (Don't worry, I know about the collision mesh, naming it, giving a material, and so on and so on).

Everything works except my part falls exactly half way through the floor when I go into the "real" world and the physics turn on.

No matter what side is up it just falls exactly halfway through.

Now I did the part config thing (added below for reference), my nodes are working fine, other parts stick to my part, my part sticks to others.

But the damn thing keeps falling through the floor if it's the bottom part.

What am i missing??? Is it something in blender or in the part file?

// Kerbal Space Program - Part Config
PART
{
// --- general parameters ---
name = KSPtest
module = Part
author = TheDude1972

// --- asset parameters ---
mesh = KSPtest.DAE
scale = 0.1
texture = KSPtest.png
specPower = 0.1
rimFalloff = 3
alphaCutoff = 0.0

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z
node_stack_top = 0.0, 5, 0.0, 0.0, 1.0, 0.0
node_stack_bottom = 0.0, -5, 0.0, 0.0, 1.0, 0.0
node_attach = 5.01, 0.0, 0.0, 1.0, 0.0, 0.0, 1

// --- editor parameters ---
cost = 10
category = Utility
subcategory = 0
title = Test Title
manufacturer = DudeTec
description = Test Description

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,1,1,0

// --- standard part parameters ---
mass = 0.15
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 12
maxTemp = 2900

}

(If needed I can make screenshots, but all you'll see is a simple cylinder that is hanging halfway through the floor)

p.s. It is a simple standard cylinder shape to test importing into KSP before I start a big project, thank God i did! :D

Link to comment
Share on other sites

Have you tried importing just the model into Unity and using basic colliders? Mesh colliders can have issues, especialy with terrain cliping.

No, i just made a basic model in Blender and followed all the instructions.

So it should work.

I don't have Unity itself.

And what do you mean with a basic collider? All references talk about using a mesh as collider.

Could you elaborate?

Link to comment
Share on other sites

If your using only Blender then I think mesh colliders are your only option. I could be wrong about that, but its the only way I know. This is kind of the old method of getting parts in game.

Unity however has more collider options. Mesh colliders can be applied, but you can also use box, sphere, and capsule colliders. Everything up to date on the subject I have come across says these non-mesh colliders are better to use when possible.

http://forum.kerbalspaceprogram.com/showthread.php/25013-Compilation-of-modding-information-links-for-0-19-0-20-Last-updated-30-06-13

This is a really good thread for modding tutorials and discussions.

Also, not sure if your aware, but basic version of Unity is free.

Link to comment
Share on other sites

If your using only Blender then I think mesh colliders are your only option. I could be wrong about that, but its the only way I know. This is kind of the old method of getting parts in game.

Unity however has more collider options. Mesh colliders can be applied, but you can also use box, sphere, and capsule colliders. Everything up to date on the subject I have come across says these non-mesh colliders are better to use when possible.

http://forum.kerbalspaceprogram.com/showthread.php/25013-Compilation-of-modding-information-links-for-0-19-0-20-Last-updated-30-06-13

This is a really good thread for modding tutorials and discussions.

Also, not sure if your aware, but basic version of Unity is free.

Thanks, I just downloaded Unity and installed it (Free = good).

The forum thread you provided looks great, i'm gonna dive head first into it.

Gonna see if I can get the hang of it as I only have experience with Blender, thanks for your replies! :)

Link to comment
Share on other sites

Gonna see if I can get the hang of it as I only have experience with Blender, thanks for your replies! :)

I downloaded Blender 10days ago, Unity i downloaded 8days ago. I had never done any 3d modeling or anything of this sort. Using these forums, tutorials at CGCookie, and the helpfull comunity of modders here I have already managed to get simple parts ingame, make engine thrust transforms, and just last night got my first animated bit ingame.

Also I forgot to mention, for Unity you need ksp PartTools..theres download for it somewhere in that thread i linked (or one of those threads)

Link to comment
Share on other sites

I've made a mod using Blender and Unity 3D. I did NOT make a collider in Blender. I dragged my Blender mesh into the assets folder, and assigned it to a new Empty game object.

You click on the Blender file in the assets folder and look in the "Inspector" tab in the upper right. Ensure that the "Generate Colliders" check box has a check, and click the Apply button. This means you don't need to have a collider in your Blender file, Unity will make them for you.

Then you click on the Empty object in the project window to open it up, and systematically select each mesh item. In the Inspector tab, be sure that the Mesh Collider section has the "Convex" checkbox checked. I've heard tell that if you fail to check the Convex box, your parts will fall through the floor.

More details on what I do available upon request.

Edited by nyrath
Link to comment
Share on other sites

I've made a mod using Blender and Unity 3D. I did NOT make a collider in Blender. I dragged my Blender mesh into the assets folder, and assigned it to a new Empty game object.

You click on the Blender file in the assets folder and look in the "Inspector" tab in the upper right. Ensure that the "Generate Colliders" check box has a check, and click the Apply button. This means you don't need to have a collider in your Blender file, Unity will make them for you.

Then you click on the Empty object in the project window to open it up, and systematically select each mesh item. In the Inspector tab, be sure that the Mesh Collider section has the "Convex" checkbox checked. I've heard tell that if you fail to check the Convex box, your parts will fall through the floor.

More details on what I do available upon request.

OK did all your steps but as i'm not familiar with Unity i'm stuck at select all meshes... uhm...

I just have a simple test cylinder, so it's selected, is that enough? did the convex thing and now...

Link to comment
Share on other sites

OK did all your steps but as i'm not familiar with Unity i'm stuck at select all meshes... uhm...

I just have a simple test cylinder, so it's selected, is that enough? did the convex thing and now...

Click on gameobject in hierarchy and if you set up paths in PartTools you should have 'write' button in inspector window

IpDFyK9.png

Link to comment
Share on other sites

Well tried all your suggestions, tried the Unity way described on the link that was given but now the part doesn't even show up in KSP :s

I give up!

I rather spend my time modeling other things then doing this.

But really thanks for your help guys, but this is to much work just to get my model in the game. :(

Link to comment
Share on other sites

OK OK, when I say I give up it means I will find out what wrong! :P

Problem solver by nature. :wink:

My Sollution:

Noticed a single red line of text on the bottom of unity giving an error as soon as it was loaded en before I did anything. Was an error message where you go, WHAT!? :huh:

Started a new project, no luck same error kept displaying.

So I uninstalled Unity, reinstalled it, added the KSP tool again and no more red error below.

So this is the fewest steps I used to get my model in KSP (for people like me who get stuck)

  1. - Added my part without the collision mesh like nyrath suggested (good one, saves some time modeling).
  2. - Added my part and texture to the assets in the bottom screen and clicked on my part.
  3. - In the inspector on the right I ticked the Generate Colliders and Generate Lightmap UV's (saw it on an older unity tutorial).
  4. - Added my part to a new blank game object (just dragged it straight to the main screen after creating the game object from the top menu).
  5. - Added the KSP part tools in the inspector by pressing the add component button.
  6. - Set the part tools model name and file URL.
  7. - Pressed Write.
  8. - loaded KSP, added just my part and started the launch.
  9. - Test part stayed where it was supposed to and didn't fall through the launchpad.

Wooohooo! Now for some divine inspiration and modeling fun :D

I feel a flying saucer coming up. :cool:

Neh, first probably a part to house my plugin (which isn't publicly available due to using a copied part).

Again, I couldn't have gotten this far without the support of KhaosCorp and nyrath.

Thanks guys and I hope this will be a help to someone else too!

Greetz TheDude1972

Edited by TheDude1972
As usual fixing stupid typo's
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...