Posted March 15, 2023 by desertslug
The v0.5.1 version adds more guidance modes to the navigation module, alongside the smaller fixes it brings.
Ships now have a greater variety of movement methods to choose from. They can approach or orbit a coordinate at a specified distance, or impact a coordinate at speed.
HOST_WRITE_NAV_ABS : &x $2 &y $2 &z $2 &dist $2 ->
Sets navigation to approach the specified coordinates at a distance.
HOST_WRITE_NAV_REL : &x $1 &y $1 &z $1 ->
Sets thrusters to push towards the specified direction. The coordinates are integers in [0, 255] representing a floating point number in [-1, 1), with 127, `0x7f` mapping to zero.
HOST_WRITE_NAV_ORB : &x $2 &y $2 &z $2 &dist $2 ->
Sets navigation to orbit the specified coordinates at a distance.
HOST_WRITE_NAV_IMP : &x $2 &y $2 &z $2 ->
Sets navigation to impact the specified coordinates.
Ships can now query the position of entities, and use this information to, for example, follow other entities by continually updating their navigation target to their position.
HOST_WRITE_NAV_ENT_POS : &entity $2 -> &entity-exists $1 : &x $2 &y $2 &z $2
Attempts to query the position of an entity.
Other notes:
MsgSrvEntityCommand