Weird animator behavior


I noticed that if I use the web animator for rotations of 360° it is executed only once.
This is the code inside a button, action event.

web.Animator1.RotateX(me, 360, 1) web.Animator1.Play

At the first click the rotation is complete, then if you click the button again it won’t rotate anymore.
For other angles, it does rotate until it becomes invisible and it’s impossible to click it anymore.

What am I missing here ? Thanks

I guess it’s because it has already rotated 360.
To make it spin again, try 720 at turn number two and see what happens. I’m just guessing here :slight_smile:

It has already been rotated and it should rotate again and again every time I click on the button and the action event is called, but it won’t.

Every time is has to rotate, add 360 to the current degree.

Simply use a global property (curr_Rotation as integer = 0)

curr_Rotation = curr_Rotation + 360 web.Animator1.RotateX(me, curr_Rotation , 1) web.Animator1.Play

Thanks Lars for the contribution but it doesn’t work, it only rotates once.

It’s a bug ?!

can you attach a sample-project, then I can have a look,

Something weird is going on indeed.
I tried this and it only rotates once although it prints the correct rotation degrees…

@Horacio Vilches, it might me time to write a feedback case.

  Static curr_Rotation as Integer
  curr_Rotation = curr_Rotation + 360
  Print Str(curr_Rotation)
  Animator1.RotateZ(Button1, curr_Rotation , 1)

Rotate half the amount for half the time, twice.

Animator1.RotateZ(PushButton1, 180, 0.5) Animator1.AddKeyframe(0.5) Animator1.RotateZ(PushButton1, 360, 0.5) Animator1.Play

This makes it spin back and fourth, in Safari :slight_smile:
In Chrome it does all kinds of different things.

I should note I’m on 2013r3.3 so I might not be the right one to try this…I’m out.

I knew something weird was going on…Will write a report.

Peace out

[quote=269148:@Albin Kiland]This makes it spin back and fourth, in Safari :slight_smile:
In Chrome it does all kinds of different things.

I should note I’m on 2013r3.3 so I might not be the right one to try this…I’m out.[/quote]
Well the CSS does not specify HOW to rotate to that angle. I would next try 4 steps. The big issue is the easing though, that would prevent the animation from looking like one smooth motion.

For anyone interested in following:

Case opend “44133 - Webanimator is buggy as fuck”

Nice. Well written case. Terrible title, though. @Paul Lefebvre is it time for a webinar on how to write an effective feedback report?

Try “If this was being sent to ME what would I like for the bug report so I could reproduce it and fix it?”
Send that

This was more “If I were searching through the list of bug reports for something pertinent to my problem, what would help me quickly eliminate or zero in on this one?”

The onscreen animation seems to take “the shortest path between two points” It looks at the starting point…the ending point…and animates a transition. If your starting and ending points “look identical” – then the shortest distance is “do nothing”. Rotating 360 degrees results in “nothing”. I have to rotate 180 twice with Keyframes to force an animation. Sometimes I noted that if you try to rotate + 350 degrees… the image will often be animated to rotate the opposite direction 10 degrees. It’s frustrating because it usually works as expected…the first time.

See JavaScript workaround for RotateZ at