Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: zzz on November 14, 2014, 11:44:24 am

Title: Return camera offset?
Post by: zzz on November 14, 2014, 11:44:24 am
Hello, is there a command that will return the current angle offset between the 3rd person camera and my model's orientation? i.e, if I'm looking directly at my model's right side I'd like to get the values 90, 0 , 0.
Title: Re: Return camera offset?
Post by: cameni on November 14, 2014, 12:04:31 pm
No direct command, but it can be computed from camera direction and model base vectors. Doable from the console ... what do you need it for?
Title: Re: Return camera offset?
Post by: zzz on November 14, 2014, 12:09:49 pm
I was going to use it as a placeholder input for mouse cursor control (steering & turrets) so I'd need it to work within a vehicle's JS file.

While I've got you here is there a way to chain console commands together? Atm I have to enter each one individually and the standard ';' delimiter doesn't work.
Title: Re: Return camera offset?
Post by: cameni on November 15, 2014, 06:56:09 am
I shall add the semicolon support, but in the meantime, there's a variable $con that represents the console interface itself, and it's got an exec method, so you can invoke console commands like
    $con.exec("..."); $con.exec("...");

Vehicle script currently doesn't have means to get the camera direction directly, it's doable only through the world interface (get_camera_dir).
Title: Re: Return camera offset?
Post by: zzz on November 20, 2014, 05:08:55 pm
I shall add the semicolon support, but in the meantime, there's a variable $con that represents the console interface itself, and it's got an exec method, so you can invoke console commands like
    $con.exec("..."); $con.exec("...");


.bind w world works with con.exec but I get "unexpected identifier" when I try to spawn something with "w.create_instance..." with it.
Title: Re: Return camera offset?
Post by: cameni on November 21, 2014, 01:18:27 am
Please give me the whole line to check what's wrong.
Title: Re: Return camera offset?
Post by: zzz on November 21, 2014, 05:41:38 am
 $con.exec(".bind w world"); $con.exec("w.create_instance("Caldari/cca2/Wyvern", {x:6000000, y:6000000, z:0}, {x:0.4744431216, y:0.467604041, z: -0.528941154, w:0.5}, true)");
Title: Re: Return camera offset?
Post by: cameni on November 21, 2014, 07:05:46 am
You have nested quotes there, change the inner ones to apostrophes:

$con.exec(".bind w world"); $con.exec("w.create_instance('Caldari/cca2/Wyvern', {x:6000000, y:6000000, z:0}, {x:0.4744431216, y:0.467604041, z: -0.528941154, w:0.5}, true)");
Title: Re: Return camera offset?
Post by: zzz on November 21, 2014, 09:00:28 am
Thanks.