Jump to content

Importing models into KSP : Models crashing the game


Recommended Posts

Edit: It is (almost) fixed. Remember to check your KSP log if you are having problems :)

I made a model for KSP, imported it into unity and used partTools to import it into the game. I then wrote this config

PART
{
name = ragequitWalkway
module = Part
author = Ragequit

mesh = model.mu
scale = 1.0

node_stack_bottom = 0.0, -0.615, 0.0, 0.0, 1.0, 0.0, 2
node_stack_top = 0.0, 0.87, 0.0, 0.0, 1.0, 0.0, 2

entryCost = 10800
cost = 900
category = Science
subcategory = 0
title = Shielded Walkway
manufacturer = Ragequit Science
description = For people without sunglasses
attachRules = 1,0,1,0,0

// --- standard part parameters ---
mass = 1.5
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 1
crashTolerance = 15
maxTemp = 3200

}

In the folder Gamedata/Ragequit/parts/Walkway lies 2 texture files, walkway.mu and part.cfg

Now, when i start up my game and go to the VAB my part doesn't show up.

I have looked through this forum, i have googled it and looked through a couple of tutorials, but i still don't know why i can't find my part.

Does anyone have an idea why it isn't working?

Edit:

The problem was either

1. I had an animation file on the wrong part

or

2. The animation model for the part in unity was set on generic and not legacy

tl:dr I made the part load by fixing those 2 things, and i made the animation work by adding this to the code


MODULE
{
name = ModuleAnimateGeneric
animationName = Take 001
startEventGUIName = Open Shields
endEventGUIName = Close Shields

}

Edit:

Since my modeling isn't that good, i managed to crash the game when Bill(or was it someone else?) walked inside the walkway.

I would guess my collision models are what is causing the crash

https://www.dropbox.com/s/7o4fpx8315l9hqw/output_log.txt <--- Here is the log if you feel like it :)

And here is the crashing part

(Filename: ..\..\Core\Common\src\BoxShape.cpp Line: 126)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\SphereShape.cpp Line: 96)

Invalid parameter because it was infinity or nan.

(Filename: Line: 150)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\CapsuleShape.cpp Line: 133)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\CapsuleShape.cpp Line: 133)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\BoxShape.cpp Line: 126)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\SphereShape.cpp Line: 96)

Invalid parameter because it was infinity or nan.

(Filename: Line: 150)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\CapsuleShape.cpp Line: 133)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\CapsuleShape.cpp Line: 133)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\BoxShape.cpp Line: 126)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\SphereShape.cpp Line: 96)

Invalid parameter because it was infinity or nan.

(Filename: Line: 150)

Invalid parameter because it was infinity or nan.

(Filename: Line: 150)

Invalid parameter because it was infinity or nan.

(Filename: Line: 150)

Invalid parameter because it was infinity or nan.

(Filename: Line: 150)

Look rotation viewing vector is zero

(Filename: Line: 62)

Look rotation viewing vector is zero

(Filename: Line: 62)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\CapsuleShape.cpp Line: 133)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\CapsuleShape.cpp Line: 133)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\BoxShape.cpp Line: 126)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\SphereShape.cpp Line: 96)

Look rotation viewing vector is zero

(Filename: Line: 62)

Look rotation viewing vector is zero

(Filename: Line: 62)

Look rotation viewing vector is zero

(Filename: Line: 62)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\CapsuleShape.cpp Line: 133)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\CapsuleShape.cpp Line: 133)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\BoxShape.cpp Line: 126)

dest.radius>=0.0f

(Filename: ..\..\Core\Common\src\SphereShape.cpp Line: 96)

recalculating orbit for mk2LanderCabin: Kerbin
rPos: [NaN, NaN, NaN] rVel: [NaN, NaN, NaN] |NaN|

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

recalculated orbit for mk2LanderCabin: the Sun
rPos: [NaN, NaN, NaN] rVel: [NaN, NaN, NaN] |NaN|

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

[Progress Node Reached]: Escape

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

[Progress Node Complete]: Escape

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

recalculating orbit for kerbalEVA (Bill Kerman): Kerbin
rPos: [NaN, NaN, NaN] rVel: [NaN, NaN, NaN] |NaN|

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

recalculated orbit for kerbalEVA (Bill Kerman): the Sun
rPos: [NaN, NaN, NaN] rVel: [NaN, NaN, NaN] |NaN|

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

setting new dominant body: the Sun
FlightGlobals.mainBody: Kerbin

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

Vessel mk2LanderCabin velocity resumed. Reference body: Sun vel: [NaN, NaN, NaN]

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

Vessel kerbalEVA (Bill Kerman) velocity resumed. Reference body: Sun vel: [NaN, NaN, NaN]

(Filename: C:/BuildAgent/work/7535de4ca26c26ac/Runtime/ExportGenerated/StandalonePlayer/UnityEngineDebug.cpp Line: 54)

Look rotation viewing vector is zero

(Filename: Line: 62)

Crash!!!

Edited by Ragequit
Crashes :/
Link to comment
Share on other sites

The only cfg-forced reason would be a missing closing "}" in your cfg ( in your code above its missing). and if you test it only in careermode instead sandbox you have to define TechRequired= xxx

First search the KSP.log for errors with your part...it could give you a hint.

If you have animations or multiple meshes in unity, try to duplicate your gameobject in unity and delete some entrys to to find the errorcausing entry

Edited by onkelsiebdruck
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...