Orientation of the marker

43 views
Skip to first unread message

wup4la1

unread,
May 18, 2012, 1:54:56 PM5/18/12
to FLARToolKit userz
I'm using FLARmanager to develop an application and would like to know
which method is responsible for guiding the label to see if he is
standing on its side or upside down. The guidelines for positioning X,
Y and Z I managed to recover but I need to know now what value is
given for when the marker is in walking for example.


thank you

eric socolofsky

unread,
May 18, 2012, 4:10:21 PM5/18/12
to flartool...@googlegroups.com
is FLARToolkitMarker.direction what you're looking for?

wup4la1

unread,
May 18, 2012, 4:52:48 PM5/18/12
to FLARToolKit userz
This displays the following error:
  [Fault] exception, information = ArgumentError: Error # 1063:
argument count mismatch examples :: Test / onMarkerAdded (). Expected
2, an obtained.




I'm playing in the value of a vector




I usually do not program in AS3, follows the lower part of the code
which is giving error




I am developing a game where each marker is a letter and have to put
the letters in order and form a word if it is correct 3D displays
corresponding object.




onMarkerAdded private function (evt: FLARMarkerEvent, ev:
FLARToolkitMarker): void {
trace ("[" + + evt.marker.patternId "] added");
/ / this.modelContainer.visible = true;




if (evt.marker.patternId == 0) {




_markers [0] = evt.marker.x;












_markers2 [0] = ev.direction;
}
























if (evt.marker.patternId == 0) {
this.modelContainer2.visible = true;
this.activeMarker1 = evt.marker;




this.modelContainer2.visible} else {= false;




}












trace ("Result" + _markers [0]);




}

On 18 maio, 19:10, eric socolofsky <e...@transmote.com> wrote:
> FLARToolkitMarker.direction é o que você está procurando?
>
> Em 18 de maio de 2012, às 10:54, wup4la1 escreveu:
>
>
>
>
>
>
>
> > Eu estou usando FLARmanager para desenvolver uma aplicação e gostaria de saber
> > Qual o método é responsável por guiar o rótulo para ver se ele é
> > Pé de lado ou de cabeça para baixo. As orientações para X posicionamento,
> > Y e ZI conseguiu recuperar, mas eu preciso saber agora o que é valor
> > Dado para quando o marcador está em pé, por exemplo.
>
> > Obrigado

wup4la1

unread,
May 18, 2012, 4:55:55 PM5/18/12
to FLARToolKit userz
the code went wrong in the message above this is correct:

private function onMarkerAdded (evt:FLARMarkerEvent,
ev:FLARToolkitMarker) :void {
trace("["+evt.marker.patternId+"] added");
//this.modelContainer.visible = true;

if (evt.marker.patternId == 0) {

_markers[0] = evt.marker.x;



_markers2 [0] = ev.direction;
}






if (evt.marker.patternId == 0 ) {
this.modelContainer2.visible = true;
this.activeMarker1 = evt.marker;

}else {this.modelContainer2.visible = false;

}



trace ("Result " + _markers [0]);

}

On 18 maio, 19:10, eric socolofsky <e...@transmote.com> wrote:

Eric Socolofsky

unread,
May 18, 2012, 7:52:39 PM5/18/12
to flartool...@googlegroups.com
your event handler onMarkerAdded() must have only one argument, the FLARMarkerEvent.
get the marker via FLARMarkerEvent.marker.

wup4la1

unread,
May 18, 2012, 11:04:33 PM5/18/12
to FLARToolKit userz
Eric




I think I managed using evt.marker.position.w;
I did a test by turning the marker at 90 ° and is increasing in value,
90
I noticed that the value starts around 180 up to 540 resulting in 360
°.
I think now I can successfully complete my thesis




Thank you

Makc

unread,
May 19, 2012, 4:02:54 AM5/19/12
to flartool...@googlegroups.com
woah

On Sat, May 19, 2012 at 5:04 AM, wup4la1 <wup...@gmail.com> wrote:
> I think I managed using evt.marker.position.w;
> I did a test by turning the marker at 90 ° and is increasing in value,
> 90
> I noticed that the value starts around 180 up to 540 resulting in 360
> °.

Eric, does it really do that?
Reply all
Reply to author
Forward
0 new messages