SimpleKeplerOrbits icon indicating copy to clipboard operation
SimpleKeplerOrbits copied to clipboard

How to calculate prograde/retrograde value?

Open GodToRun opened this issue 3 years ago • 1 comments

Hello. i'm currently working on a game like KSP. so i want to calculate prograde/retrograde value. i tried velocityHandle.transform.position += velocityHandle.transform.right but it is not perfect solution. anyone help me?

GodToRun avatar Oct 13 '22 15:10 GodToRun

hi. what do you mean by 'value'? the direction (normal vector)? in this case you can just normalize velocity vector, which will give you prograde direction. from this you can derive everything else. for example, you can add this vector to your body's position to get world space position of prograde point (it seems like this is what you trying to get). note: velocityHandle transform is not a root source of the orbit data (it's just a simple way to display and manually control velocity), so I would not recommend using it anywhere.

Karth42 avatar Oct 18 '22 07:10 Karth42