Still stuck with the "launch_tracer". I still could not figure out how to get the id of my missile object .... that I want to shoot from the carrier vehicle..whatever I used for get_eid() I get error "has no method get_eid"...for instance I tried $throw.get_eid() or with obj as defined below obj.get_eid() but get the same error. I get no error if I do this.geom = this.get_geomob(0) this.geom.get_eid() it gives me a number (apparently the id of the carrier but how to get that of the missile ?)
world = this.$query_interface("ot::js::world.get");
obj = world.create_instance("outerra/missile/missile" , pos, rot, false); creates an apparently static missile
$throw = this.$query_interface("ot::js::dynamic_object.create", "outerra/missile/missile", ecef2, shipQuat); OK creates a dynamic missile but don't know how to get_eid()
Another trial that gave no error but still no moving missile was the following:
tracer = this.fire(mdc, {x:plasmaquat.x, y:plasmaquat.y, z:plasmaquat.z}, 100, 30, {x:1,y:1, z:0});
pos = this.geom.get_world_pos_offset(mdc);
bullet = world.create_instance("outerra/missile/missile", pos, shipQuat, false);
$explosions.launch_tracer( mdc, {x:0, y:1000000, z:0}, 3, {x:1,y:1, z:0}, 0.5, 0.2, 0, 0, tracer , bullet , 0 );
It created the missile at right spot and orientation, gave no error, but the missile is a static one and remains in place. IF i try the same with $throw.id() again no error, the missile is dynamic and $throw.id() increases by 1 with each shoot but the missile is not deagged along with the tracer....by the way what is a tracer ?? is it the plasma-thing ?
Also if I try the following I get no error and even bullet.id() is a number that changes with every shoot but missile remains static
$explosions.launch_tracer( mdc, {x:0, y:1000000, z:0}, 3, {x:1,y:1, z:0}, 0.5, 0.2, 0, 0, tracer , bullet.id() , 0 );