Look at this:
http://www.screencast.com/users/alejandro.gonzalez/folders/Jing/media/790b6e7b-7bb5-4432-a1c7-bd0535dbeb0d
On Feb 18, 5:10 pm, LOUHICHI DHIA EL HAK <dha...@yahoo.fr> wrote:
> example for what?sorry i didn't understand you!
> Cordialement
> Louhichi Dhia El Hak
>
> ________________________________
> De : eric socolofsky <e...@transmote.com>
I believe he means
http://makc3d.wordpress.com/2009/12/23/unity3d-and-flartoolkit-steering-wheel-test/
The basic code goes like this:
private function calculateTilt (square:FLARSquare, direction:int):Number {
// assuming user holds the marker correctly, we can average lines
var i:int, j:int, rise:Number = 0, run:Number = 0, line:FLARLinear;
for (i = 0; i < 4; i++) {
j = (4 + i - direction) % 4;
line = FLARLinear (square.line [j]);
var drun:Number = (i % 2 == 0) ? line.run : -line.rise;
var drise:Number = (i % 2 == 0) ? line.rise : line.run;
if (drun < 0) {
drun *= -1;
drise *= -1;
}
rise += drise;
run += drun;
}
return Math.atan2 (rise, run) * 2 / Math.PI;
}
for more ideas write more.
shachar
On Feb 19, 9:17 am, Makc <makc.the.gr...@gmail.com> wrote:
> On Fri, Feb 19, 2010 at 12:10 AM, LOUHICHI DHIA EL HAK <dha...@yahoo.fr> wrote:
>
> > example for what?sorry i didn't understand you!
>
> I believe he meanshttp://makc3d.wordpress.com/2009/12/23/unity3d-and-flartoolkit-steeri...
I'm trying to do a look a like asteroid game.
I want to control a plane by the marker and try to dodge some ball
that i create in papervision.
the problem is that when i move the marker all the ball are moving
to. So ...how can i move the marker and not the hole scene :S
*Sorry for my lame english.
Thank you for your time.
Sebast.