-
Posts
522 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Romfarer
-
if (GUILayout.RepeatButton("testRepeat", Util.StdStyle, GUILayout.ExpandWidth(true))) {
FlightCtrlState ctrlState = new FlightCtrlState();
if(system.Target!=null && system.Target is Vessel){
ctrlState.roll = 1;
(system.Target as Vessel).rootPart.propagateControlUpdate(ctrlState);
}
}
Ok here is a little test code. (
seems to not be allowed :/) Anyways, this code does not cause roll as expected. Setting ctrlState.mainThrottle = 1; causes the target vessel to activate engines.
(system.Target as Vessel).isCommandable returns True.
(system.Target as Vessel).packed returns False
(system.Target as Vessel).rootPart.isControllable returns False, but it does that in the atmoshphere too and it works fine there.
(system.Target as Vessel).rootPart.packed returns False.