pixartist
-
Posts
126 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Bug Reports
Posts posted by pixartist
-
-
After playing around with it some more today, I came up with pretty much the same solution. And I also haven't got a clue what the manual lock is:)
The mechjeb code also uses the Quaternation.Euler(90,0,0), so i gues that is the right way.
I did find a way prevent the SAS to go mad when you set it:
currentHeading = Quaternion.LookRotation(vessel.transform.up) * Quaternion.Euler(90,0,0);
targetHeading = Quaternion.LookRotation(targetVector) * Quaternion.Euler(90,0,0);
if (Quaternion.Angle(currentHeading, targetHeading) > 10)
{
target = Quaternion.RotateTowards(currentHeading, targetHeading, 2f);
}
else
{
target = Quaternion.LookRotation(targetHeading);
}
part.vessel.VesselSAS.LockHeading(target, true);Hope this makes sense.
Hi, what kind of values does your "targetVector" take ? Are they basically navball values ?
-
I found these id's on github, does this make sense ?
public enum DefaultResources : int
{
ElectricCharge = 1576437329,
MonoPropellant = 2001413032,
EVAPropellant = -792463147,
Seperator1 = 35,
Seperator2 = 36,
LiquidFuel = 374119730,
Oxidizer = -1823983486,
SolidFuel = 650317537,
IntakeAir = -1909417378,
XenonGas = 1447111193
} -
Oh, good to know. But how do I check what kind of resource something is ? I can't seem to find some kind of enum like ResourceType... Is the only way to check PartResource.resourceName ? How am I supposed to know those strings ?
-
I can only find FuelTank.fuel, but not maxFuel or fuelCapacity or something similar. How can I find out the maximum fuel capacity of a tank ?
-
I know I can use
Program.Vessel.VesselSAS.LockHeading(); to set the heading of the SAS. Now what exactly is the relationship between the Euler Angles used to construct the quaternion for the SAS heading and the actual position on the navball ? Are they relative to world space or to the body my vessel is orbiting ? What's the most elegant way to use the three values of an euler angle to set the pitch (x), yaw(y) and roll(z) relative to the object I am orbiting ? Is there maybe some "navball quaternion" which I could use to rotate my constructed quat to the correct orientation ? Thanks
-
Is it guaranteed that OnAwake will be called after OnStart() with state of PreLaunch ?
-
How freely can I use multithreading ? I used it and it works, but is it advisable ?
-
One option would be to compress it (if necessary), convert to base64 and then store in a ConfigNode the way SCANsat does. They found a handy snippet to help with this
Great Idea!
-
No, I can't serialize it to the node with the node system. I need to serialize an entire custom node system ( with node connections, events, data etc). Currently I simply use a binaryFormatter to serialize it into a binary file. I might at some pont switch to xml. How can I store my data "next to" my vessel ?
-
So, I have a lot of data to save in my PartModule. What is the standard way to save / load it, so that it stays persistent from VAB to prelaunch etc ?
-
-
Nobody got an idea?
-
GUI.skin = HighLogic.skin
Thanks!
-
How do I use the KSP Gui Skin and KSP textures in my GUI ? Is there some way to find the resource names & locations ? Thanks
-
How do I close / hide the editor tooltip from my plugin ? Thanks
-
I think my mistake was a wrong / missing module name, got it to work now.
-
Hi, I followed the tutorials in the wiki to create a simple plugin:
using System;
using System.Collections.Generic;
using System.Text;
using KSP;
using UnityEngine;
namespace KSPFlightPlanner
{
public class FPComputer : PartModule
{
private bool inEditor = false;
public override void OnStart(StartState state)
{
print("FP Started instance" + state);
if (state == StartState.Editor)
{
inEditor = true;
}
}
public override void OnInitialize()
{
print("Initiated instance");
}
public override void OnUpdate()
{
if (inEditor)
{
GUI.Box(new Rect(100, 100, 100, 300), "Test");
}
}
}
}The library does not throw any errors when loading, but I can't find any output in the log files. What's wrong here ?
-
Best to grab the zip and reinstall everything. This will get rid of cfg's as well in the mechjeb folder. Things change enough that the cfg's can cause issues on existing craft.
I did that and the mechjeb menu is invisible.
-
Why not?
what version of mechjeb.dll are you using? what version of KSP? When did it stop working?
In other words: provide enough information for someone to help you.
Latest ( 207 & 23.5). It stopped working when I updated mechjeb from 205 (I think...some version from yesterday) to 207
-
Can't access the Mechjeb menu any more:
-
So, I got a feeling that the amount of science a measurement creates is reduced by the same amount whether I send it or take it back to Kerbin, so does the total amount of science I can gain from each body get reduced when sending it?
-
Is the inaccurate node targeting fixed in 200 ?
-
On the website it says it's an unofficial mod. Others say it's official and actually 23.5. So what is it? When will it come out? I can't seem to find any reliable info...
How to get the absolute Navball rotation value ?
in KSP1 C# Plugin Development Help and Support
Posted
So, how can I get the heading of my vessel relative to the surface, e.g. the value the navball recieves for its rotation ?