Jump to content

Another question


Recommended Posts

How do I go about creating a fairing for the engine bell?  I'm talking about a fairing that "hides" the engine bell when there are parts (ie - stages) below the engine. 

I'm guessing a separate mesh is needed, but how would I bring said mesh into Unity?  Would I need to do it while 'creating' the engine/collision mesh itself in Unity?  Or could it be done in a second creation after the engine has been created (and then called via the .cfg file)?  If it needs to be done at the same time as the engine, could someone tell me how I would go about it (or point me towards a tutorial on it)?

As usual, thanks in advance - all you "pro" modders are the best!

ZD

Link to comment
Share on other sites

It's a separate object in Unity, then in the .cfg file you use the Jettison module to let KSP know that it's a fairing and how it works.  I'm linking to a thread that discusses it and appears to have a sample file set up!  There's a video tutorial of doing it in the tutorials master thread too I think?  If this isn't enough to get you going let me know!

Link to comment
Share on other sites

Thanks!  On my way to read the link you provided.

ZD

Edited to add:  Thanks again!  Don't know how I had missed that thread before, but you (it) answered my question exactly!  I really appreciate the help.

 

Edited by ZuluDoggy
Link to comment
Share on other sites

So then, I read through the stuff on the above link, built a new mesh for the fairing, used the section of the .cfg to call the fairing when needed, and...nothing.  I even had to add a "Icon_Hidden" tag in Unity to select it (there is no Icon_hidden tag in Unity 5.2.4, and one of the posters said it was a necessity).  After it didn't show up initially, I went back and rebuilt the fairing adding a mesh collider to it this time, still nothing.  I even took out the "Icon_Hidden" tag on a 3rd rebuild, still no effect.  Here's the portion of the .cfg file that I'm using, what am I missing? 

"
 MODULE
 {
  name = ModuleJettison
  jettisonName = WAHSLPfair.mu
  bottomNodeName = bottom
  isFairing = True
  jettisonedObjectMass = 0.5
  jettisonForce = 15
  jettisonDirection = 0 0 1
 }

"

 

ZD

 

(And the engine that I built the fairing for imported into the game and works as designed...it's just this cussed fairing!)

Edited by ZuluDoggy
added parenthetic statement
Link to comment
Share on other sites

I played with this once but it was a while ago so grain of salt. The "jettisonName =" - I think you want the name of the fairing in Unity - not the mu file. You do need the Icon_hidden or (I think) the faring shows up in the thumbnail in the editor and you won't see the engine.

Don't know if you've seen this

Very helpful for seeing the internal structure in game.

Edited by wasml
Link to comment
Share on other sites

If that's the case then just dripping the .mu might fix it!   And, just to be clear,  you're exporting the engine and fairing in the same .mu file?  They're both children of the same empty game object and that game object is carrying the magic part tools script? 

 

If you still can't get it a screenshot of your unity hierarchy might help us figure it out!  I'll post a screenshot of one of mine that works tomorrow.   You're almost there.   It's one annoying checkbox or extra comma or click and drag away.  I know it's infuriating when you're almost there though! 

Link to comment
Share on other sites

16 hours ago, artwhaley said:

If that's the case then just dripping the .mu might fix it!   And, just to be clear,  you're exporting the engine and fairing in the same .mu file?  They're both children of the same empty game object and that game object is carrying the magic part tools script? 

 

If you still can't get it a screenshot of your unity hierarchy might help us figure it out!  I'll post a screenshot of one of mine that works tomorrow.   You're almost there.   It's one annoying checkbox or extra comma or click and drag away.  I know it's infuriating when you're almost there though! 

Hold on...no, I'm exporting them as different .mu files.  Suddenly I suspect that you've hit upon my problem.  If it wasn't so stinking late I would boot Unity and try this again.  I've no idea why/where I got the impression these needed to be separate .mu files.  Well, looks like more time spent in Unity tomorrow.  On the plus side, I'm actually starting to work through the Unity building process without constantly referring to a guide...  :-D

ZD

Link to comment
Share on other sites

654659a5b02c35401c393dc276b7805e.png

That's an engine without the engine-   just a thrust plate.   I've explained all 4 elements in the hierarchy - you don't HAVE to leave the mesh items as children of the blender file either.  So it could be just the three items.  (or more than three - by the time you add your gimbal and thrust transforms.    But they're all under the same game object being exported as the same .mu. 

Link to comment
Share on other sites

@artwhaley:  Thanks immensely!  Your earlier post was the key.  Rather than including the fairing in the original engine build in Unity, I was doing a second build and creating a separate fairing part (which oddly enough, wasn't showing up anywhere in my test 'vanilla' install, but...) and then trying to call that part via the engine's .cfg file.  Adding the fairing as a child of the engine in Unity did the trick.  However...

Everyone/Anyone else:

The picture of the engine in-game now includes the fairing, despite my changing (creating) the tag "Icon_Hidden".  When I attach the engine to the bottom of a rocket the fairing does not show up (as is proper) until something is added below it.  But it's in the picture, and being a bit of a perfectionist, I now need to fix that.  Any ideas? I have a couple of screen grabs of the hierarchy(s) I used in Unity - I've made it both a child of the engine (which is a child of the main project) and as a child of the main project.  Unfortunately I can't figure out where to store them to add them to this post. 

 

ZD

 

Link to comment
Share on other sites

That's weird...  that tag SHOULD be what does it.  It's been a while since I've fiddled with that though...  check spelling and capitalization?  I'll flip through the tutorials again and see if I see any little step that could be in your way! 

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