Forums » Suggestions

Lua API: 3-D Velocity vector

Mar 25, 2018 prepioli link
I've read that /displayshippos (or Displayshippos() in the API?) used to give users their 3-D spatial coordinates in (x,y,z)... And also sometimes hippos. I understand that this was removed out of fear of it being abused via scripts.

I have a related request that might be harder to exploit: I was hoping that the devs could provide readout for a ship's 3-dimensional velocity vectors. The reason is I would like to write a plugin that would display a user's velocity vector on their heads up display. This is typically done in modern day aircraft: https://imgur.com/a/DFv4D

I think it would be a fun little project. Just giving it some cursory thought, I don't believe that anyone could use this to find position without a point of reference. Obviously just velocities won't help you find a sector's Cartesian origin. Otherwise I am not sure how it could be abused. I could be missing something though -- input appreciated. Hope to hear from you, devs.
Mar 25, 2018 Phaserlight link
A Flight Path Marker would be really cool.
Mar 25, 2018 prepioli link
Right? I realized after I posted that someone could use a stationary object such as an asteroid and combine velocity data with range to the object to find position -- but there may be multiple solutions to the resulting math. I'm not really sure, I've never tried something like that. Something for the whiteboard. And I'm also not sure how knowing your ship's XYZ could be abused.
Mar 26, 2018 Pizzasgood link
I disagree that this would be any help at all in determining your coordinates. It would only help in establishing which direction you're moving; getting actual coordinates would still require trilateration from roids (which you can do just fine without velocity information). It's still exploitable, however. The question is whether it's more exploitable than what we already have.

Most of the tasks one would use auto-pilot to handle involve homing in on a targetable object or a distinct radar emblem (e.g. jump point). That doesn't require coordinates or velocity, just an external program that does computer vision to the radar display and then steers with simulated input. Easy.

The hard part is docking, since you have to approach along a specific, narrow range of vectors, not just get sufficiently close from any direction. That's where knowing coordinates comes in. Knowing your velocity vector would also work -- you move forward and rotate slowly until your vector is centered in the valid range for a dock, then strafe around until the dock is front and center. If the trilateration method is easier, then adding the velocity vector doesn't hurt. If the velocity vector method is easier, then adding it does hurt (though perhaps only a little).

But do we actually need this information via Lua in the first place? If what you really want is the visual indicator in the hud, asking for that directly might be more effective. Exploiting a hud indicator would definitely be harder than trilateration.