Anteworld - Outerra Game > JavaScript development

Methods

<< < (12/13) > >>

cameni:
A typical Angrypig's undocumented function :)
But the second argument is "offset", so I assume it's an offset in model space.

It returns an object that contains pos and rot members, rot is a quaternion.

SteelRat:

--- Quote from: cameni on June 03, 2016, 04:27:54 pm ---A typical Angrypig's undocumented function :)
But the second argument is "offset", so I assume it's an offset in model space.

It returns an object that contains pos and rot members, rot is a quaternion.

--- End quote ---

Ok. Thanks!

SteelRat:

--- Quote from: SteelRat on July 02, 2015, 01:38:05 pm --- :facepalm: :)

The correct version


--- Code: ---function update_frame(dt, engine, brake, steering)
{
...

if (this.canvas != undefined)
this.sketch.delete_canvas(this.canvas);

this.canvas = this.sketch.create_canvas(this.grp, {x:0,y:2,z:0});

var speed = Math.round(this.speed()*3.6);
var txt = "";
txt += "Speed: " + speed + "\n";
this.sketch.draw_text({x:0,y:0}, 0xffffffff, txt);
}

--- End code ---

Dear developers, do not forget about the method

--- Code: ---this.sketch.clear_canvas(this.canvas);

--- End code ---

--- End quote ---

Wow!!!
Only today said that added :)


--- Code: ---this.sketch.clear_canvas()
--- End code ---

Many thanks! :)

SteelRat:
Hi Cameni!


--- Code: ---INFO: get_bone_model_dq:
{
"$ret":true,
"rot":{"x":3.0616174623351647e-17,"y":-5.960463766996327e-8,"z":3.515645981781436e-17,"w":1.0000001192092896},
"dual":{"x":0.050012435764074326,"y":0.6886845231056213,"z":1.227365493774414,"w":4.845940893005718e-8} // <-- What is it?
}

--- End code ---

cameni:
http://cs.gmu.edu/~jmlien/teaching/cs451/uploads/Main/dual-quaternion.pdf

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version