royals
Members-
Posts
20 -
Joined
-
Last visited
Reputation
0 NeutralProfile Information
-
About me
Bottle Rocketeer
-
Alright, that helps a lot, thank you. Didn't know that about TWR actually, but now that I think about it it seems pretty obvious. I actually looked at your source code for TWR1 and I got some *cough*inspiration*cough*. Well anyway, I was just loading my craft and nothing happens, because the debug is getting filled with: "[Exception]: TypeLoadException: Could not load type 'Vector3d' from assembly 'Assembly-CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.". Any idea why this happens? I am using UnityEngine and System, I have Assembly-CSharp and UnityEngine in my references, plus my CoM is set to type Vector3, not Vector3d. Thanks for taking the time to help me on this, I'll be sure to pay it forward once I get a lot better with C# Loading gif
-
Thanks for the reply! thrustAvailable is right now just set to engine.maxThrust but it's wrong since maxThrust is set to 100 while I can get 115-120 kN of thrust at full throttle. The problem is I don't know how to calculate it. I know about the flaw in my formula, it's just I've tried so many different ways so now I decided to try that one. Also if I don't have any altitude restrictions or so, just solely go for TWR, the TWR can be 1.000 but I still get +3m/s vertical speed. Is vessel.getTotalMass() flawed or is it the localg that is wrong (9.81)?
-
Hi, been busting my ass for the last 6 hours trying to get my code, making a single engine craft hover, to work. I've tried like 7 methods on how to make it hover around a target altitude, but it just isn't stable enough (the methods make the altitude vary between everything from 10 meters to 200). I need some sort of formula to set the throttle, and I've tried so many I can't even remember them. The latest one I have tried is: throttle = (1 / (currentAlt / targetAlt)) * ((vesselmass * localg) / thrustAvailable); But it is very unstable, craft goes up and down a lot. Has anyone done something like this before and can help me out? Also, MechJebs KEEP VERT is unstable too, so can't borrow anything from there. Also why doesn't this work? It's the same way (or very close to how) it's done by MechJeb. (Vector3d)CoM = vessel.findWorldCenterOfMass(); (float)localg = FlightGlobals.getGeeForceAtPosition(CoM).magnitude; When I set localg this way, nothing works at all, I don't get any KSPEvents/Fields displayed, nothing. If I just set localg = 9.81f, it works. Thanks in advance!
-
Alright thanks but I figured it out, used x = part.parent and then x.FindModuleImplementing<>(); What I'm now curious about is how about editing custom modules? UnityEngine doesn't include my class Foobar, so if I want to reference something in another module which I've made myself, how does that work? For example with engines I can say 'ModuleEngines x = blah blah' but I can't say 'Foobar x = ...' since neither System nor UnityEngine has that class. Must I add a "using x;" or how would I go about that?
-
How do KSP do animations? With ModuleAnimateGeneric, the animation plays till the end then reverses. I can't get this behaviour, I only get it to play to the end then it jumps back to the beginning and plays from there. How can I do this in my own module? Also parts like landing gears and legs: while in the editor, how can I get parts to jump directly to the end and beginning without playing the whole animation? Cheers
-
Welp, looks like that was it :facepalm: all good here now, thanks
-
Oh, I'm using 4.5.4... Could that be why? I'm gonna try to install that version and get back
-
It feels like I'm spamming these forums but I just can't figure this one out. If I select my game object and open the animation tab, I can add clips but I don't see objects or anything like that: http://imgur.com/a/8KD0U As you can see my animation tab is empty. If I select the child of the game object, I can only see imported animation clips if I have any (can't add any then either, all options are disabled/greyed out). It also doesn't matter if I've imported animations from Blender... This is really irritating when I try to do emissive textures and stuff, I can click "add curve" when I've selected the "highest" parent and choose the emissive material in gameobject->mesh renderer->emissive color. But then when I change the value, nothing happens. I've seen videos where people change the values and the emissive parts light up but not for me :/ Sorry if I don't really explain it well, I'm tired and english isn't my native language but nonetheless, all answers are greatly appreciated!
-
Heard about putting multiple textures into one file should save performance, is it as simple as putting all parts in one directory and using the same texture in Unity? So when you export it, the models are all looking for the same file? Or can you reference textures outside the model's directory? Sorry if this has been answered before, have searched the forum but couldn't find anything.