Project Drag and Snap Vessel Assembly

joggeb3

New member
Joined
Feb 11, 2015
Messages
1
Reaction score
0
Points
0
Hi!

I've been working on a plugin, that will enable dragging around and docking vessels together inside orbiter.
With this tool, you can currently drag in a new vessel from a list, dock it to other vessels, and delete vessels, all using only your mouse!

It might require downloading and installing this file, VS 2010 redistributable.

How it works
When a scenario starts, the plugin "hooks" onto the orbiter window, allowing it to receive key and mouse events. It also at the same time reads through all vessels in the scene, and builds a collision model for each existing vessel as well as any newly created vessel using coldet. This allows the plugin to trace rays through space and use coldet to determine if the ray collided with any vessel, and can therefore drag that vessel around.

Currently, since the meshes are loaded when starting the game and when creating a new vessel, the collision detection do not support animations or vessels changing meshes.

Installation
Download the zip file and extract to your modules/plugin directory and enable "Assembly" (working name) in the launcher.

How to use
To create a new vessel, first open the custom controls (the same place you would find the scenario editor) and open "Assembly". There you will find a list of vessels just like the scenario editor. To create a new vessel, just select the one you want and drag out onto the screen.

To dock two vessels together, just drag one of them so that the docking ports are close to the other and they will snap together.
To undock, simply drag one of the vessels away from the other.

To drag more than one docked vessel, hold control and drag. If the superstructure of vessels are docked to the vessel you are focusing on, it will be undocked, since dragging the focused vessel has some inherent difficulties.

To delete a vessel, you right click the vessel and click "delete".



I have plans on expanding the right click menu, it could for example be used to eject stages in a multistage rocket, or be used to check status on IMS modules.



There are some vessels that currently cause CTD:s, so save often and please report what vessel is causing problems, so that I can find its cause.



Please let me know if there are any problems, if you have any suggestions and if you are prepared to help me on this project. I could put the source code on github, if there's interest for that. A small warning though, I'm not very experienced with c++ and have even less experience with coding together with others, so there may have to be a lot of clean up after my newbie mistakes and a lot of explaining what this or that part do.

/Johan
 

Attachments

Last edited:
Back
Top