I'm coming to grips with it but I'm not a very experienced coder.
I'm converting that code to Lua and in order for me to get it working I had to give the variable "rofs" a value.
local vs = vi:get_rawstatus(1)
local t = vs:get()
local sdir = {x=-1,y=0,z=0}
local svel = 4.0
local rofs =...
I wrote this some time ago following a tutorial
VESSELSTATUS vs;
char name[256];
VECTOR3 sofs = _V(-0.46, 0, 11.25);
VECTOR3 sdir = _V(-1, 0, 0);
double svel = 4.0;
// Get vessel status structure
VECTOR3 rofs;
GetStatus (vs);
Local2Rel (sofs, vs.rpos)...
- BUMP -
I still haven't figured this out.
Creating the spent vessel is easy enough. Giving it some rotation is fine:
local vs = vi:get_rawstatus(1)
local t = vs:get()
t.vrot = {x=0,y=0.5,z=0}
vs:set(t)
oapi.create_vessel("OmegaFairing1", "OmegaFairing1", vs)
I'm giving it a little...
I'm working on a multistage vessel but I can't create new vessels in the right position.
I can create them, give them velocity and rotation, but I have to cheat and use "shiftCG" to get them to spawn in the right place.
It works OK but it's not perfect. Anyone know the proper way to do this?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.