in reply to For zentara (rotating thingy)

Yeah, I use linux and your script still dosn't work right. First, the test for OS dosn't work, and I had to comment all that sub out.
if ($ENV{'OS'} =~ /Windows_NT/){ ..... }
it still tries to load Win32 modules at compile time, you need to put it in a BEGIN block, see use module if condition is met or Conditionally override 'time' builtin with Time::HiRes::time()

Second your rotation is very stuttered and lags behind the mouse movement, on linux anyways. If I move the mouse in a straight line horizontally across the screen, it rotates, But if I try to move the mouse around the dial, it switches direction at each cartesian axis crossing. Weird. You need to do some "quadrant checking", so that when you move from one quadrant to the next, the rotation continues smoothly.


I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: For zentara (rotating thingy)
by Anonymous Monk on May 01, 2006 at 12:08 UTC
    zentara, I work on it a bit at a time... so have't worked on OS issues in a while and don't know a thing about compiling... Will maybe look up your "You need to do some "quadrant checking", so that when you move from one quadrant to the next, the rotation continues smoothly." It looks to me like I need it 2.

    But for now I've moved on to trying to rotate the inner ball so as to match the main(when it's closed and the reopend).

    # so I need to get the main's angle/degree of rotation

    #something like this:

    # my ($xref2, $yref2) = $zinc->transform($zinc->group('current'), 1, 0, 0);

    # $zinc->rotate($inerbal,*******);

    # Am on Windows XP Home # With ActiveState ActivePerl 5.8.7 Build 815 # Also use EnginSite Perl Editor LITE

      Well have heart and keep trying. :-) When I was first beginning it sometimes took days (even weeks) to figure something out. But that is the learning process...... the more you hack and try, the more you learn and the better you will get. You did pick a particularly hard problem to start with. :-)

      I'm kind of interested in how to do this myself, I may post a way to get it to work in a day or 2, but it may have different logic from your program. Good luck, and don't let it get you down.


      I'm not really a human, but I play one on earth. flash japh