SpaceCraft Control 13.5


First of all, I don’t think this is the correct forum section to post this. If a moderator knows where it should go, is it possible to move the thread?

This is a project I’ve been working on for quite a long time now: SpaceCraft Control. It all started with SpaceBuild, in which you could either build a ship easily using hoverballs or the shuttle entity, which wasn’t really realistic regarding newtonian physics, or try to make your own steering system to control all 6 degrees of freedom. SpaceCraft Control is my contribution to the 2nd option. Here’s a presentation video of the version 13.5:

Download link for version 13.7 (did some updates)

Also, here’s another project, based on SCC: SpaceCraft AutoPilot

Best regards,


This shouldn’t be here, I think. This seems more appropriate for the Lua section.

That said, this looks fairly interesting. You might want to tell the SpaceBuild Revival team about this.

Actually, I didn’t do any LUA coding for this project. The ship is an ordinary prop controlled by a wire Expression2.

That’s awesome!
I had made one of these myself a year or so ago, but it wasn’t anywhere near as complex as this and wouldn’t adjust correctly (it was a feature I implemented, but it got glitchy after 100,000 pounds or so).
How exactly did you get it to stabilize? Do you just use applyOffsetForce to keep the ship held locked at its angles, and then free an axis once a certain movement key is pressed?

Anyway, great job!

This is pretty awesome :smiley:

Basically, SCC measures the ship’s angular and translation velocity and decomposes them into the ship’s local XYZ and Pitch Yaw Roll axes. Then, corresponding thrusters apply force proportionally the the decomposed velocity, in the opposite direction (because we want it to stop moving, not accelerating).

Nevertheless, thruster’s output is limited to a maximum value set by the realism parameter. If the realism parameter is high, maximum thrust is fairly low which is why the ship drifts a lot more.

Now this is revolutionary. Amazing job.

Thanks a lot!

with you permission, i would like to post a link to this page in the Spacebuild revival thread

i think if you were to take what you have done and see if you (or someone else) could transfer it across to lua. you would have a very, Very nice sent which i think even the SPEP team would be intersted in.

Of course you can! SpaceBuild is what motivated me to make this in the first place!

As for the transfer across LUA, if it is possible to keep the same physical properties, I’d really love to. The problem is that I don’t know anything about LUA.

Would you mind releasing the E2s to this? I would be more than willing to convert this into Lua.

Do you have intentions on releasing the E2?

Mother of god while i was watching the video my mind was telling me: X3 X3 X3 X3 X3 X3 X3:TC X3:TC X3:TC X3:TC X3:TC X3:TC


This is really cool, ever think of making it like those old school 1980s games where you add a gun to the spaceship allowing it to blow up the asteroids?

Weaponry can easily be added, simply weld a turret or a Gcombat canon (if you want to destroy props) to the ship.

As for the release, I was thinking about making a pack containing the models, the expressions as well as an adv dupe with wiring already done, but this will have to wait for a while as I’m on another project for now.

For the LUA conversion, I can send the E2 code but I would first be sure that nothing is changed. Also, the joystick part looks difficult to make.

This is ludicrously awesome. I turned a beat-up car into a spaceship in about 30 seconds. Hehe.

Is there an easy way / any way of making this work with multi-prop ships? Is that feature planned for the future?

Oh, someone found the Garry’s mod upload! Just to let you know, the file you downloaded was meant to the wiremod forums’ users to “beta test” it. A bug-free version should be uploaded soon and download links will be provided on this forum thread as well.

Unfortunately, multi-prop ships aren’t supported because it would use too much of the E2’s ops (at least, the way I tried ended up that way). So the only way to use SCC with multiple prop is to spawn it on a big base prop and weld other smaller stuff to it. And sadly, I don’t have time anymore to work on SCC, just enough for the release.

By the way, did you encounter problems with the test pack?

Whoops, I didn’t even notice there wasn’t a download link in the OP… Hehe. I haven’t tested it on SpaceBuild yet, but I used the gravity and air density cvars for spacey tests.

Everything seems pretty much fine. One thing I noticed is that the hover mode doesn’t do anything, although I’m not sure if that was the intention; you still drift slowly downwards (assuming there is gravity present). But I’m not sure if this was because of the wire chips/seat being welded to the prop or not.

Aside from those quite minor issues, the whole system worked really well. Awesome stuff. :]

It slowly drifting downward, to me, sounds like its taking the downward velocity of the ship and countering it rather than setting a target altitude. Setting a target altitude pretty much turns it into hoverball mode, but it works - quite well.

Beautiful. It’s a shame that source maps are so small or I’d find myself playing more spacebuild. Half a kilometer cubed isn’t quite enough room for the whole space experience.

Thanks a lot for testing SCC!

When flying with gravity, it is normal that the ships falls. It will fill slower than freefall because stabilisation thrusters are reading vertical velocity and apply a proportional and opposite force. Activating hover thrusters won’t change this because the ship doesn’t automaticly maintain altitude. You have to use your vertical translation command input to vary your altitude. For joystick users, this is done by holding the joy 6 button (translation mode) and moving your joystick along the pitch axis. You can also use W and S. For keyboard users, helod the translation mode key (shift) and use W and S.