Jump to content

lo-fi

Members
  • Posts

    2,419
  • Joined

  • Last visited

Everything posted by lo-fi

  1. Absolutely. My previous experience has been writing embedded C on low power hardware, so I have an aversion to using computing cycles where they aren't needed. Running and if() fifty times a second doesn't seem to make a lot of sense when I can just activate another method only when I need it and forgo the check every frame. Granted, modern hardware is so powerful it's really not much of an issue, but we each stick to our ways My 2p worth, anyway!
  2. Be careful using FixedUpdate. It works, but you may find that certain things break as it runs all the time. A good example is this: This.vessel is null in the editor, so anything you've got in FixedUpdate that uses something to do with vessel will likely spam the log with null refs. It's not pretty. A much more elegant way to go about it is use OnFixedUpdate, and use the part.ForceActivate() method in OnStart() with a check to see if the bool for HighLogic.LoadedSceneIsFlight is true. Assuming that's what you want, but most of the time this is the case. OnFixedUpdate will not run until you nudge it into action like so, so this is where you be been having trouble. On mobile and working from memory, but that should point you in roughly the right direction. Happy coding Disclaimer: I'm a C# newbie, but learned about this the hard way.
  3. Ah, that's a nice way of doing it. I need to look into the new NODE method, I noticed in your thread the other day. I was going to post the trig, but you'd got it sorted by the time I got to setting up the equation. I suppose that could be a tutorial in itself.. Ooo, cookies! Om nom nom. Cheers, hope it helps a few people. I'll be doing more, I quite enjoy making tutorials
  4. Just took a peek at pizza's mod. It's using a very different method to mine, so more tinkering may be required. It's possible the effects module isn't quite flexible enough, so I may have to change how it works. Let me know how you get on, anyway
  5. You're welcome. Sorry it took a while, I've been busy writing code and making parts
  6. 1) It's all done with KSPField using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; using ObjectTools; namespace MyProject { public class SomePartModule : PartModule { [KSPField(isPersistant = false)] public int someInteger; [KSPField(isPersistant = false)] public int someInteger2 = 1; [KSPField(isPersistant = true)] public float someFloat = 1; //more stuff here }// end class }//end namespace In you config, you could have: MODULE { name = SomePartModule someInteger = 2 someInteger2 = -1 someFloat = 1.25 } The values will be read out of the config and will overide what they are set to in the code. The variables must be declared public (C# defaults to private) for this to work. Notice the isPersistent attribute can be, and is, applied to the float in this case. This means that if the value is modified by the code in-game, the value will be stored in the persistence file for that instance of that part, and will be read back upon loading that save. HTH That is assuming I've interpreted your question correctly..
  7. As it says on the tin A re-record of the Twitch steam, but with the stuff I missed. This covers the stock ModuleWheel, set up the stock fashion and elaborates on the well known post here: http://forum.kerbalspaceprogram.com/threads/72120-Wheels-and-their-Unity-hierarchy An excellent source of further information can be found here, along with a rigged scene that Spanner has kindly provided: http://forum.kerbalspaceprogram.com/threads/83200 Edit: I'll package up the materials used in the tutorial for download tomorrow at some point.
  8. Absolutely, just change the pitch values the same as the volume. The plugin generates a value 0-1, calcluated by current RPM/maxRPM (defined in the config). The second values for pitch or volume can be changed, so maybe try: EFFECTS { WheelEffect { AUDIO { channel = Ship clip = KerbalFoundries/Sounds/wheel volume = 0.0 0.0 volume = 0.1 0.2 volume = 1.0 1.0 pitch = 0.0 0.2 pitch = 1.0 1.8 loop = true } } } Either way, it's the pitch you'll want to play with probably. Or I'm open to suggestions for a better sound That was a recoding of an electric space heater mashed through some filters, IIRC
  9. From experience, I'd go with more rather than less. Modern hardware is so powerful, Unity is pretty slick, and the limiting factor with KSP seems to be physics stuff, rather than mesh complexity. There was a 90,000 polygon test a while back it dealt with rather well. For something large I'd push the boat out and go for the 48. I'm still careful not to use polygons where they aren't needed, but the bad old days of really low poly models seem to be well behind us Love your work, would like to design a little rover body to fit in the bay. Any chance of some dimensions or a temp download just for scale?
  10. Great, thank you both I'll do some digging.
  11. Sounds pretty cool, I have to admit Got a tiny wheel design going, just need to find a suitable suspension rig. Also had a very enlightening discussion about struts this morning, which will be integral to retaining rovers in the launch/lander capsules I want to make. PHEW! You had me worried there. Thanks for the info, that's one to watch out for.
  12. That's something I haven't found. Could you post some vids? The tracks are really no different to wheels, so something not right there at all
  13. Hi Not sure whether this lives here, in plugin dev, or modelling forum, but maybe someone can point me in the right direction. I've got the hang of using EFFECT nodes for sounds, like so: EFFECTS { WheelEffect { AUDIO { channel = Ship clip = KerbalFoundries/Sounds/wheel volume = 0.0 0.0 volume = 0.1 0.2 volume = 1.0 1.0 pitch = 0.0 0.2 pitch = 1.0 .7 loop = true } } But I'm wondering if there are nodes other than AUDIO that you can call into an effect? Lights, maybe? Does anyone know of any example configs if so? Cheers Lo-Fi
  14. Almost. The first number is just a value that the plugin passes to the effect module. The second is the volume or pitch for that value, so it's the second one you want to modify. Very similar to the floatcurves used for steering and torque.
  15. Superb! Thank you for the detailed response, I really appreciate it. I think you've pretty much sorted everything I need for my next project Maybe I can bodge a way to spawn your new auto struts at nodes on my lander chassis for the moment, but I look forward to the integral strut guns. Keep up the great work!
  16. Ah, I see Not a career mode player myself, so these things tend to pass me by..
  17. Doesn't look bad to me! Great work and very useful. So do they sort of auto aim to each other? I was wondering, is it possible to have multiple struts integral to a part? I have an idea for a launch capsule with a bay for rovers. Which is all well and good, but what's missing is a way of retaining the rovers in place (a single docking node doesn't cut it). What I was thinking of was having maybe eight strut connections pointing into the bay that can be activated manually in flight, attaching to the rover wherever they intersect it and creating the joints accordingly. What you've demonstrated above looks almost perfect - in fact, having tie down points placed on the rover might be even better - but having to place the struts manually inside the bay would be rather tricky. Fantastic work, I'd appreciate any insights you may have
  18. Tracks are a bunch of wheel colliders and some visual trickery, so the same applies really. I'll maybe knock out some tiny test parts, see what you guys make of their behaviour. Researching the little trip that happens occasionally has proved interesting. Seems to be similar to the old problem where the suspension would wind up, then spring back. Further information is proving hard to find. I do know that the wheel raycast loses ground contact when moving over certain points of terrain, and this seems to correspond with where the suspension would unwind (makes perfect sense) and the trip happens. I can see no way to fix it, however. The annoying thing is, it's far worse with small suspension travel. Though I suppose making small wheels with decent suspension travel might work well...
  19. I'll have a go. Things tend to get rather odd at that scale, so they may not work well in KSP. The suspension raycast has a significant non linear error and torque is measured in force, not force applied at a length away from a fulcrum. It all gets kinda weird.
  20. Just realised I may have left a debugging message hitting the log. I'll issue an update shortly. I'm quite pleased with the small wheels, now trying to decide what sort of design would be good for a really small set.
  21. ^Tricky, as they don't have rotational symmetry. Working on that.... I forgot: Spanners wicked landing skid/ski will also be in 1.8. Little teaser of the small wheels:
  22. Ah, long tracks. Yep, quite quick at tracks now, there will be a long set too. Showcase would be brilliant, thank you hopefully have some more textures sorted and a greater range of parts with 1.8, so that would probably be a good point.
  23. Dual function: work as wheels until you toggle the into repulsor mode, at which point they flip sideways (hence the Back To The Future reference), then work as repulsors. I'll make a showcase vid, it's probably overdue Useful for high speed dashes in repulsor mode, then you've got the fine control and stability wheels give. And the animation is just cool! 1.8: Small wheels, small tracks, the aforementioned, probably something else I haven't come up with yet, plus usual bug fixes etc. Maybe some small rover bodies with integrated command seat. No idea on timescales, will depend on texturing. Rough idea, anyway.
  24. That's a tricky one due to the way KSP handles symmetry - being rotational, rather than mirror. The beams go forward on the left and backwards in the right. I do have a solution for this, but it's still in development... The screws use it actually, but it needs improvement for anything more complex. Thinking about it, I may have forgotten to include that little plugin with the 1.7 download!!!! I will go check...
  25. Hehe. I can do an external command seat bike sort of thing for use with small wheels and tracks - would be quite cool, I think. Hubless wheels will be up next. 1.8 will be a parts release with small wheels, small tracks, repulsor wheels (think BTTF) and hopefully a surface mount track. Look closely; they're not medium wheels they are converting repulsor wheels! Will be in 1.8, normal medium wheels will share the texture for the common parts. Gorgeous, isn't it! Justin excelled himself there Oh, you mean certreless supported by a force field kind of thing? Yeah, that would be cool. A rubber band wheel I can certainly do Thanks guys, keep it coming!
×
×
  • Create New...