Jump to content

Allow mod control of part rotation increments in VAB/SPH


Recommended Posts

Apologies if this is already possible but I've not found anything that looks likely in the editor interface. Basically, I want to build some vessels that require (very) accurately set angles between parts (e.g. radially attached girders at 31.72 degrees from horizontal) and the only way I can currently see of doing this is editing the craft file directly.

I don't think the core editor needs this but it should be very simple to allow a plugin to set the angle that the WASDQE keys rotate the selected part by. Two simple properties on EditorLogic that set the increments for coarse and fine rotations should be very easy to add to the core editor code and would make it possible for plugins such as Editor extensions to easily allow part rotations to be accurately controlled without needing a different set of controls (editable fields, up/down buttons etc). Having a hot-key that cycles the fine rotation through 5, 1, 0.1 and 0.01 degrees (and a display of the current rotation angles) would make it very easy to set up accurate angles between parts solely using hot-keys (so it wouldn't need you to click on controls while a part is selected).

Link to comment
Share on other sites

Hehe, that's exactly where the 31.72 degrees is from (icosahedron) though it also needs 5 way symmetry...

http://forum.kerbalspaceprogram.com/threads/71515-How-many-people-know-how-to-dock?p=1003761&viewfull=1#post1003761

Edit: Also, I agree it would be nice in the core editor but that would be substantially more work for Squad, needing to implement and test new UI as well as making the rotation code read the increments from the variables. Just adding the variables themselves should (assuming the code is reasonably sanely written) be very simple...

Edited by Padishar
Link to comment
Share on other sites

  • 1 month later...

I decided to write a simple plugin to allow part angles to be accurately set (see the thread here) and while I was testing it I noticed something odd about the current way the "wasdqe" keys rotate the parts. Basically, for roll (q and e) and yaw (a and d) the shifted keys and the unshifted keys go the same direction but for the pitch control (w and s) they go in opposite directions. E.g. if you hit shift-a 18 times and then hit d the part goes back to where it started but hitting shift-w 18 times and then hitting s results in the part being 180 degrees from the original orientation.

This should be another trivial fix though it would be nice if the rotation increments could also be made adjustable as described in the first post.

Link to comment
Share on other sites

  • 1 month later...

The latest version of my plugin overrides the behaviour of the standard part rotation keys when Alt is held down to apply the angle increment entered in the dialog for the particular axis. E.g. entering 1 in each of the fields will make the Alt-WASDQE keys rotate the part in 1 degree increments. This reduces the need for the controllable angle increments requested in the first post though it would still be nice to have as this method is still a bit clunky...

This doesn't try to fix the issue in #4 with the unshifted pitch controls going in the wrong direction. It would be nice to know if either of these issues has been fixed for 0.24. If they haven't then I will try to "fix" them in my plugin. I already have to "undo" the 90 degree rotation the core game performs when hitting Alt-WASDQE so it shouldn't be too difficult to reverse the 90 degree rotation when W or S are used on their own. It should also be pretty easy to "override" the amounts that shift-WASDQE applies by undoing the default 5 degree rotation and applying a different amount instead (and give the user a hotkey to cycle the amount through the 5, 1, 0.1, 0.01 that I suggested). I originally thought this would look really nasty with the part jumping by 5 degrees and then back again but the implementation of the Alt keys has shown this isn't as bad as I thought.

Link to comment
Share on other sites

The very latest version of my Part Angle Display plugin (0.2.2.0) now fixes issue #4, allows the angle increment for unshifted and shifted rotation to be changed (with a hotkey in the case of shifted rotation) and also allows the rotations to be done relative to the current orientation of the part.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...