OnClick Rotating Problem
-
Hi,
Just starting to play around with DC and i'm already having trouble trying to rotate a component. It is supposed to rotate 90º on each mouse click. The first few rotations work fine, but every time it completes a revolution, the next rotation goes anti-clockwise.
I think I understand this behaviour, and in order to solve it I do the following
(Attribute) RotY: (360*rev_count) + deg
(Attribute) onClick: ANIMATE(deg,90,180,270,360)
(Attribute) condition: if(deg=360,rev_count=rev_count+1,rev_count=rev_count)
(Attribute) deg: 0
(Attribute) rev_count: 0but it doesn´t work. The 'rev_count' variable never changes its value.
Any ideas? It should be fairly easy to achieve but I can't find a way to do so.
Thanks!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement