rotate animation bug?

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: Ralph, russ

Post Reply
Message
Author
User avatar
Sling
Posts: 4504
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

rotate animation bug?

#1 Post by Sling » Sat Jun 19, 2021 5:35 am

Hi,

Just found something else that i've not come across before. If you use the rotate animation features on a value that passes through zero you get incorrect behaviour.

Use the C172 altimeter and change the hundreds needle rotation line to

rotate(needle_100, t, "LOG", 0.1)

Now move the baro knob so the hundreds needle passes through 0 from both directions and you will see the issue. I tried "LINEAR" & "LOG" nut obviously didn't expect that to make any difference. However I also tried adding all of the available direction argumnets but nothing works. I would of expected "DIRECT" to be correct. While on this subject the wiki page does not state what default is used for direction if it is not stipulated. I'm guessing "DIRECT" but it would be good to update the page to say what the default is.

Tony

User avatar
Corjan
Posts: 2416
Joined: Thu Nov 19, 2015 9:04 am

Re: rotate animation bug?

#2 Post by Corjan » Sat Jun 19, 2021 12:06 pm

Hi,

Will have a look at this next week.

Corjan

User avatar
Corjan
Posts: 2416
Joined: Thu Nov 19, 2015 9:04 am

Re: rotate animation bug?

#3 Post by Corjan » Tue Jun 29, 2021 1:25 pm

Hi,


Bit later, but...

Two things:

1) By default the rotate will use an absolute angle. The code goes from 0 all the way to 3600 or so, in that case it will make 10 complete rotations. Setting the animation direction to 'FASTEST' will resolve this. In this case the code could be:

Code: Select all

rotate(needle_100, t, "LOG", 0.1, "FASTEST")
2) There is a bug in AM that makes it misbehave. I have fixed this and will be in the first AM 4.1 BETA.


Corjan

User avatar
Corjan
Posts: 2416
Joined: Thu Nov 19, 2015 9:04 am

Re: rotate animation bug?

#4 Post by Corjan » Tue Jun 29, 2021 1:27 pm

I have also updated the wiki a bit to explain the difference between direct and relative modes.

Corjan

User avatar
Sling
Posts: 4504
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: rotate animation bug?

#5 Post by Sling » Wed Jun 30, 2021 12:49 am

Thanks Corjan. Glad you found the bug. I'll check out the fix once you release the first 4.1 beta.

User avatar
Sling
Posts: 4504
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: rotate animation bug?

#6 Post by Sling » Wed Jun 30, 2021 11:04 am

Confirmed. It now works. You need to use "FASTEST" for most cases I think. Perhaps it should be default rather than "DIRECT".

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests