API Question Getting global position of a body

jedidia

shoemaker without legs
Addon Developer
Joined
Mar 19, 2008
Messages
11,321
Reaction score
2,792
Points
203
Location
between the planets
I'm trying to make a communications array point at a selectable target. It's easy enough for vessels, by getting their global position, transforming them to local ones and rotate the antenna accordingly (already working).

It wouldn't be any more difficult for planets, if I could only figure out how to get the global coordinates of planets. It's probably just one more thing I'm missing in the API docs, but I can only find functions to retrieve positions for light sources or vessels.
 
Pardon if I'm just ignorant, but doesn't oapiGetGlobalPos work for both vessels or celestial bodies?
 
It's me being ignorant, actually. Yes, that should work nicely. It was even noted as related functions to VESSEL::GetGlobalPos, no Idea how I managed to overlook that :facepalm:

thanks!
 
Back
Top