I've tried to use your example given but it is not working.
Right now i'm trying to spawn a basic object at the latlon 0,0, with 1km height which in the ECEF should be
x = 6370
y = 0
z = 0
http://www.oc.nps.edu/oc2902w/coord/llhxyz.htmThe pos looks to be a double3 which isn't a native javascript object as far as I know but i've tried both as
var pos = {
x:6379,
y:0,
z:0
};
Which gives me a Error reading struct opening token fatal error
or simply as
var pos;
pos.x = 6379;
pos.y = 0;
pos.z = 0;
The rest of the code is as you provided
var world = $eview.$query_interface("ot::js::world.get");
var rot = 90;
var v = world.create_instance("outerra/ddg/ddg", pos, rot, false);
//Dynamic update? resetting val
v.set_pos(pos);
v.set_rot(rot);
Either it crashes or nothing happens. I've chosen the large ship, which in position 0.0 should be fairly easy to spot if something was being spawned in.
What am I doing wrong?
Any tips for selecting height to be waveheight in a given position?
I also tried taking the position from the IGC using
var igc = $eview.$query_interface("ot::js::igc.get");
var pos = igc.pos();
Which immediately crashes the software.
Thanks