I am making an auto moon orbit program.
Tags
Question3 Comments
- Log in to leave a comment
-
-
Mod sflanker
It's not a single instruction, but it's not that complicated. Because you can lock heading to a PCI vector all you need to do is lock heading to the radial vector in a loop. Assuming that by "radial" you mean away from your parent body you can just use your position vector (toward the parent body would be your position vector
* -1
). I'm not sure it is necessary, but I tend to normalize vectors in this case by force of habit.
1 Upvote
Log in in to upvote this post.
@sflanker the problem is that I am not in Luna orbit yet, so it points at the planet but does not do what I want. Is there any way to stay perpendicular to prograde and retrograde while making sure it is in towards the middle of the orbit?