Jump to content

Search the Community

Showing results for tags 'transform'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 1
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


About me


Location


Interests

Found 2 results

  1. Is there any way to figure out what transforms are avaialbe on a part model. Until now I have only seen how to acces a transform on a part module you know the name of, or though it parent, but what if you don't know the name. Is there any utility, trick or c# code I can list all possible transform objects on a model? Is there some root Transform on a part I might get access to it child transforms?
  2. To elaborate : I'm writing a plugin that will read part.cfg to get a transform for a part's sub-object. There is part.FindModelTransform() but it relies on transform's name being unique. The plugin i'm writing will be released to be used by part creators and will read transform name from part.cfg, so i don't have control over what gets entered. What i want is to use part.transform.Find() that can use full path to named transform but so far i had no luck on my demo part. I tried to recursively build a path from transform to its parents by concatenating their names and it didn't work. I did find an older post about pretty much the same problem and it did show some clear examples but it didn't work for me. Here is example code i tried : Transform partTransform = part.FindModelTransform("gate_shield_root"); string transformPath = partTransform.name; while (partTransform.parent != null) { partTransform = partTransform.parent; transformPath = partTransform.name + "/" + transformPath; } Debug.Log ("path = " + transformPath); Debug.Log("find() = " + (transform.Find(transformPath) != null).ToString()); This printed out HX1AerodynamicGateShell/model/0000_MyParts/HX_1_Aerodynamic_Gate_Shell/model(Clone)/base/gate_shield_root and Find() failed on that one. In Unity, my model hierarchy looks like this (names are as seen in hierarchy view) : GameObject > base > gate_shield_root The only clue how a path should look like in the above mentioned post was this (extra spaces for clarity) model / Your_Game_Object_In_Unity / Root_Object_In_Model / Sub_Object / ... / Sub_Object_WIth_Needed_Transform
×
×
  • Create New...