sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    OnClick Rotating Problem

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    1 Posts 1 Posters 675 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      JuanLopez
      last edited by

      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: 0

      but 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!

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement