Jump to content

EndlessWaves

Members
  • Posts

    1,359
  • Joined

  • Last visited

Everything posted by EndlessWaves

  1. That was the pluginData folder alongside your plugin? The one in the base game directory isn't likely to work anymore.
  2. See sticky: http://forum.kerbalspaceprogram.com/threads/53025-Science-and-mods!
  3. Don't get too hung up on Vessel, it seems to be a class used to represent data about a collection of physics objects (part rigidbodies joined by Joints) and not an entity itself. Any methods it has that apply to physics matters are almost certainly convenience methods that loop through all the parts and issue commands to each of them.
  4. That's almost certainly not the right way of doing whatever you're trying to do. Hackness aside, I can think of a few possible reasons for this behaviour: 1. Different definition of position. Vessel represents a collection of parts, so how exactly do you define it's position? Even without getting into the detail of unity structure there are several options - root component, current control location, center of mass, geometric center. Have you tried the different functions giving the vessel's position (e.g. vessel.transform.position) and seeing whether they show the same behaviour. 2. Your code may be running before the physics and/or other classes (orbit), so if their are forces acting on the vessel that frame then they'll more them slightly from the position you specify. Ditto for the vessel.GetWorldPos3D() if it returns a pre-computed value. 3. GetWorldPos may be designed for more approximate duties and is less accurate then SetPos, hence your deviation. P.S. I wouldn't call base.OnFixedUpdate() or similar methods.
  5. Assuming you're using ModuleEngines then the co-ordinates of the FX definitions are no longer used. Visual effects positions are determined by the fxOffset property of ModuleEngines relative to the object specified in the thrustVectorTransformName property.
  6. He started the thread, it's fair enough for him to post an update.
  7. Yes No, 0,0,0 is the origin of the scene as exported from unity (which may also be the center of your collider coincidentally)
  8. Plugins are common language runtime libraries, aka .NET dlls. I guess it should be possible to write them with any .NET language as in theory they all combine to the same end result but the developers provided the initial examples in C# and everyone followed them. So far nobody has has done more than tinker with other languages as far as I know. As damny says, C Sharp isn't that closely related to old fashioned C and it's direct extensions (C++, Objective C) so stick to C# materials.
  9. It's name is whatever you specify in the config file in the thrustVectorTransformName property. Squad typically uses the name thrustTransform but there's no requirement for you to do so if you'd rather do something else (e.g. pointWhereHotStuffComesOut). It should be oriented with the negative Z axis pointing in the direction of thrust, i.e. the blue arrow points the same way as the exhaust goes.
  10. Your description you could be interpreted in a couple of ways but assuming you want to make an IVA control that triggers an action group for the whole rocket then it would be something like the following: Your basic class would extend InternalModule and be instantiated in the same way as the other IVA components (see the prop.cfg text files in GameData\Squad\Props for the individual IVA components, the spaces folder for placing them in IVA scenes). Then you'd invoke the desired action group. I haven't done it but the ActionGroups property of the Vessel class looks like a good candiate. You inherit a reference to the current Vessel from InternalModule in the vessel variable. I'm not sure which class sends that style of message, try ScreenMessages (which has static methods).
  11. The main issue I have with spaceport is clause 7 of the upload terms: The average mod author publishes a mod on an upload and forget about it basis. They may provide updates for patches but how many people are really going to have that sort of ongoing involvement over the entire life of the game that they'll be aware of any news about spaceport changes in five days or less? I understand squad need to cover their backs but there should be some effort to find something that means mod authors aren't giving away blanket permission should the outlook of the controllers of spaceport change (squad going bust and being bought up by ubisoft for example). Perhaps a requirement to explicit agreement to the new terms with existing uploads either continuing under the old ones or being removed. As to the site, I offer the following comments: 1. As of writing the left-sidebar is somewhat jumbly and would look better with the elements more lined up. 2. I'm not sure about the 'space agencies' concept. Or rather, I think it's a great idea to allow shared ownership but the site currently seems set up to use it as the default with presumably even lone authors needing to create one. I'd prefer to have everything referring to an author instead of an agency but with the ability for groups to create an agency as the author. Hierarchies and single controllers shouldn't be required either, multi-person mods are sometimes just two or three people with different skill sets working on their own aspects rather than teams with leaders. 3. Tabs each with only a small amount of information are horrible. All of the single line bits of information (KSP version etc.) should always be visible. 4. The ability to keep all bug reports and feedback of a mod in one place is valuable, so the ability to redirect commenters to the official KSP forum thread would be nice. Magical integration if squad will allow it, a simple 'the author requests comments for this mod be posted on the forum' notice and the ability to close site comments if not.
  12. It may be that your surface normal isn't reflecting terrain before you open map view and is afterwards (or vice versa). The way I'd get the Vector that passes between the vessel and the center of the body is to subtract the two positions from each other - i.e. vessel.position - vessel.mainBody.position (or vice versa depending on which way round you want the vector). Then scale as appropriate. It doesn't involve latitude and longitude though.
  13. The default ones, nodes are scaled by rescaleFactor as well as vertices.
  14. World space is the top level co-ordinate system, it's sort of used in unity as the common reference when it would be too tiresome to translate up and down manually. Every transform has built in methods ((Inverse)TransformPoint/Direction) to translate to and from it. The PQS classes are Components (Monobehaviours) that are attached to the GameObject representing a planet (or a child) and seem to handle the terrain and features of that planet. There are various other components that go to make up 'the planet' like CelestialBody and OrbitDriver. I don't actually know how the rotation is handled though, whether the planetary GameObject is rotated or whether the information is stored in one of the components. Although the former seems at first glance as if it would be much simpler I haven't actually checked the object to see whether it's rotation values change over time. The planetary GameObjects are named after their planet, Kerbin, Eeloo, The Sun etc. or you can just grab the object that a handy relevant component is attached to (e.g. CelestialBody). Last time I checked there were actually two objects for each planet with the same name, a parent and child, but I don't know what that's about (it may even just had been a bug in my code).
  15. I'm not familiar with how the orbits are given. If they do give out a vector relative to the planet then planet.transform.TransformPoint(orbitPosition) will convert it to a world space vector. I wouldn't be surprised if they gave out the position in world space directly though. EDIT: Where planet should be the relevent object of type CelestialBody
  16. Given the message signature is: public bool RayIntersection(Vector3 worldStart, Vector3 worldDirection, out Vector3d intersection) I'd imagine it's in worldspace co-ordinates, so it's simply vessel.transform.position (or .position of whatever transform you want to use to represent the vessel). The future generally is obviously not predictable as it depends on user control inputs, so you have a specific circumstance in mind?
  17. Surely this is only a problem if you absolutely have to run the code as soon as possible after your assembly loads, is it not possible to run it slightly later after all of the other assemblies have loaded?
  18. If they were some amazing in depth tutorials that covered everything they'd be signposted in a sticky. What are you familiar with already? As you've got the expensive Adobe CC is it safe to assume you've pretty experienced when it comes to images?
  19. It's a directional vector so it's circular (i.e. sinusoidal) not linear. x = cos(t), y = sin(t) and all that. I'm a bit rusty but these numbers look about right: 60° is cos(60), 0, sin(60) = 0.5, 0, 0.866. Or as a unit vector as squad give all their measurements cos²(60), 0, sin²(60) = 0.25, 0, 0.75 0.33, 0, 0.66 is acos(sqrt(0.333)) or asin(sqrt(0.66) = 55 degrees.
  20. That code is perfectly correct. craft.parts is the list of parts. You're getting that output because C#'s default List implementation of toString() gives you details of it's class not contents, if you'd wanted to print out the names of all parts you'd use something like a foreach look on the list like in hab's example.
  21. Have you started a new flight? Editing the config files won't change which modules already launched parts have attached.
  22. FOSS code is that which allows modification of the source code. While plugins have to include the source code for security there's no obligation for them to allow people to modify or further redistribute it. Craft files are a description of which parts are used and how they're placed, not the parts themselves.
  23. India isn't Somalia or Syria. This is a developing country that's got a stable government and is building itself infrastructure and sorting it's out it's problems. It's just as important for them to plan for the future by working out how they can contribute to cutting edge technology as it is to solve the problems of the present - there's not much point raising people out of poverty if all the opportunities they have are to work in call centres.
  24. KSPEvents are by default named after the method. That method is tagged with the event attribute. Presumably something went wrong when you tried it? What was that? Did the log have anything to say? p.s. You don't need to create a new ModuleCommand when declaring a variable. ModuleCOmmand tModuleCommand; is sufficient.
×
×
  • Create New...