Jump to content

Changing craft orientation


Recommended Posts

Hello,

I've been playing around with modding KSP for a little bit, and am wondering if there is a way to change the craft's orientation to point in a specific direction in space similar to how Hyperedit can change the spacecraft's position, without involving physics forces? Just a direct, clean change of orientation. Any coordinate system will do as long as I know which one it is. I found a Translate() method in the Vessel class, but I didn't find any corresponding Orient() method or whatever, the SetRotation() method seems to affect angular velocity rather than angular position, and hacking into the vessel.transform and vessel.rigidbody stuff did not yield any results.

Thanks!

Link to comment
Share on other sites

I don't think this is possible when a craft is loaded and being controlled.

The reason for this is that there is no "vessel" transform to rotate, rather the vessel is made up of the individual parts and the root part (or control from here part) is the orientation used for anything "vessel". That's why the navball orientation changes when you use the "control from here" option, all you are doing is changing the master part on the vessel.

So if you "teleport" rotate a part, KSP is going to treat that as a force on the part and rip your craft to shreads as all the other parts did not move.

Well, probably, maybe it will go kraken instead or something, but not what you intend I don't think.

D.

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...