Jump to content

leoshnoire

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by leoshnoire

  1. Interesting, I've attempted to do the same, both in KSP and in the actual Unity engine, I have not had any luck drawing lines nor quads to any effect. Apparently the GL calls do require you to have Unity Pro, which would explain this setup not working in the engine; however, it is very peculiar that it would not work with KSP (being built in Pro), either through some fluke of its design or whatnot. If nothing else, you may want to try using Unity's LineRenderer class to achieve the same; it should provide similar (if not greater) functionality than what hand-coded OpenGL can achieve.
  2. You can get a part's up vector in worldspace by calling part.transform.up. You can use this along with the part.transform.position to instantiate an object directly in front of your part at an arbitary distance. Also, if you need to keep track of rotation, you may want to copy part.transform.rotation an apply it to your new object as well. The Unity docs are particularly helpful for these kinds of operations, and it can help to familiarize yourself with the local/global coordinate systems and transforms. I hope that helps!
  3. I've gone through on getting set up, basic gui, programming concepts, etc; it will get you off the ground from sqaure one, and take you to a point where you can hopefully use the concepts you've learned for your own creations!
×
×
  • Create New...