Jump to content

r4m0n

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by r4m0n

  1. You can be assured that: OnPartStart is always called before any other operations. OnFlightStart is always called when the part get in the flight scene. Here is a good place to create your TCPListener. OnPartDestroy is always called before your part gets removed from the game. It may have been deactivated, disconnected, packed or exploded before it gets here, but it always does. I recommend destroying your TCPListener here, and checking if the part is still usable before doing anything.
  2. The [tt]err[/tt] variable is the difference from where you are pointed to where you want to point, so yes, just acting directly on the error would give you a P controller (same effect as setting Ki and Kd to 0 and Kp to 1). The practical effect is that the ship will try to correct the course, but will ignore angular momentum, so it will overshot and try again, then reverse the controls and keep doing that.
  3. You should work either with Cartesian coordinates or Polar coordinates, looks like you are trying to work with both. If you want the ship to move 'forward' accounting for her rotation, you will need to rotate the velocity vector you are adding. Yes, things are starting to look ugly, welcome to game programming
  4. That is a PID controller. It isn\'t very simple to explain, and took quite a while to get into that state in which it works reasonably... As for what you want, your best approach would be to use this code fragment as is, and set those variables before it: tgt_fwd = the direction you want to go, in world coordinates tgt_up = the direction you want 'up' to be, will only affect roll. If you want to keep the current one, use vessel.transform.up The integral and prev_err variables must be kept from frame to frame, and should be zeroed if you change your target. Else than that, you will probably need to calibrate your K parameters, but the values in MechJeb should work if you keep the code like that.
  5. You just add the vectors, the combined velocity is the magnitude of the resulting vector. In your example: (10, 0) + (0, 10) = (10, 10) the vector magnitude you can find out with Pythagoras\' theorem, which is: v = sqrt(x^2 + y^2), or in the example ~= 14.14 Ninja\'ed, but here it is anyway
  6. The code looks right... I\'ve had a few problems with focus, you can try GUI.FocusWindow() to see if it helps.
  7. There is Sun and sun... Although star would be better, the game itself is calling it a sun, so be it... Its name is still Kerbol.
  8. I don\'t think you can change the way the origin is the VAB grab point, but you could solve your problem with multiple top attach nodes, no? As for the module system: The legs were built the same way the other vanilla parts, but they all have the same level of access to the game as the module system. For animation, the biggest problem at the moment is that there is no loader for the animation, so you need to do everything in code by hand. But the whole Unity engine is in there and accessible to the modules, so making any kind of joints and animation is possible.
  9. We would basically have to encapsulate the whole game, or big portions of it. Too add to the problem, the game is constantly changing, and I\'ve already had to make changes to my modules twice since x1 came out. The idea is interesting, and a class that brings useful functions together would be useful, but maintaining it with the game basically in a alpha state would be pretty hard. Still, if someone has any idea that could make this work, I think it may be worth the trouble.
  10. No, but half of it I already had planned for my remote control interface, and you betcha I\'ll add the rest too
  11. The sun has no surface, but since 0.14x4 there is an altitude check. If you get too close to the sun while on physics (1~2X), you will crash (been there, done that ;D)
  12. I don\'t think anything improper was meant by the animators, the screenshot lacks context.
  13. I\'m pretty sure you are NOT misinterpreting his point :-\
  14. I\'m not under considerable stress, 32 years old, and also have no idea why the show seems so good... But loved pretty much each episode I\'ve seen so far. So, I guess that it\'s either subliminal messaging, or the show is actually good =P
  15. I guess it must come down to peer review, and maybe get the DLLs compiled by some trusted party or automatically. People will still be able to get mods directly, but at their own risk... You could use code signing to allow only some mods to run, but I think that would restrict things too much.
  16. Working on an autopilot, but until the distribution guidelines get official I can\'t post anything.
  17. Unless the save format changes (unlikely), just copy the saves folder over.
  18. That would be a hands-free challenge, not just no instruments
  19. Clever use of tricouplers as landing gears, and I like the triangular look of the craft
  20. If you have any problems with imgur, PM me and I\'ll get you some private upload space.
  21. Oh my god - It\'s full of struts!
  22. Wow... If I add another stage to my craft (which I should), it will still be half of yours. I don\'t think even my computer can handle that many LFTs :\'( Congratulations, not sure if we can go much lower than that stock only...
  23. Easier done than said... err http://lyrics.filestube.com/song/c0c6dc09a868524203e9,Chicken-on-a-Raft.html
  24. Actually, the Enterprise sub-light engines (Impulse drive) are located in the saucer, not the nacelles. The nacelles are the warp engines, which apparently don\'t tear the ship apart ;D
  25. Yeah, got down to 2700M on a second try, my ship started to get a little reluctant to spin around... I need to add a lot more dV if I\'m going down further, the speeds down there get insane. Did I mention my ship is stock only? ???
×
×
  • Create New...