• Greetings!
    If somebody would help me - i will be very pleased. I shortened radar code to one sentence:

    Code
    <events onviewchange="action(onviewchange);"/><action name="onviewchange">set(plugin[plugin].x, view.hlookat)</action>


    (the scale of rotation doesn't matters right now)
    I was going to do something like this:

    BUT!
    I don't know how to loop this compass stripe - it goes away from the screen and that's all.
    Hope someone will help me to avoid this annoying defect.

  • Three solutions:

    1) Reset the plugin position when view.hlookat reaches 360/-360, add some lines like this to your action:

    if(view.vlookat GT 360, set(plugin[plugin].x,0);
    if(view.vlookat LT -360, set(plugin[plugin].x,0);

    This will work but maybe the reseting of the plugin position would generate some kind of flicker.

    2) Little more complicated, use a chain of two plugins masked by another one and alternate it's positions depending on which direction the rotation is. When user rotates right the second image appears at the end of the first one and when second image finishes first one appears at the end of the second one, same for the other direction. Your compass would see as a continuous line in any direction and after any number of turns. I don't visualize completely the code here but it must not be that hard, if you're stuck post your advance to see how can it be modified.

    3) Got get a baseball bat and show technology who's the boss... (use this one wisely ;-))

    Hope they work for you.

    Cheers!

    Luis

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!