Jump to content

Yaw for Target


Recommended Posts

I've a question about kOs. I'm not sure this is the proper section but I've seen other questions regard scripting so I guess it would fit... if not I'll be glad to correct.

I need the yaw for my ship target.

I know I can excellently use 

set steering to target:position

but I need to extrapolate yaw from the vector going from my ship to the target.

I did some vector manipulation taking ship and target position, subtracting the vector and extrapolating yaw from the result.

technically works but the numer is meaningless as, I assume, ship:body:position and target:position are referring to different coordinates system. 

In fact target is only 1 Km far and I found out polar coordinates with weird giant numbers... so clearly I'm not referring to the same 

I finally realize target:position is somehow a relative position of the target from the ship (I guess). But extracting the yaw from it doesn't sound very effective. 

 

anyone knows how to extract the direction (or the vector) between target and ship?

 

Link to comment
Share on other sites

I just realize that :body suffix refers to the planet we are on. ship:body:position and target:body:position returns the same value and it changes in time even if target and ship are stopped... i guess that's mun coordinates.

that's useful to know but still I don't have a solution...

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