• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Sliding door with rotating handle

Scheduled Pinned Locked Moved Dynamic Components
sketchup
8 Posts 2 Posters 1.6k Views
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
    jharchar
    last edited by 1 Jun 2011, 20:17

    I'm trying to create a sliding door that moves on click and also have the door handle rotate 90 degrees at the same time.
    please post a solution or re-upload sliding door.skp with solution so I can see what you did.

    Thanks in advance ๐Ÿ’š


    saved as skp7

    1 Reply Last reply Reply Quote 0
    • J Offline
      jharchar
      last edited by 1 Jun 2011, 20:52

      So i kinda figured it out but i couldn't get the handle to rotate 90 degrees. The rotation seems to be restricted by the x position of door#1.
      so still looking for a better solution. ๐Ÿ˜


      skp7 2nd try

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by 1 Jun 2011, 21:00

        Instead of using the animate function to change the X, you could create a new custom attribute, and then animate that attribute.

        Let's say you add an attribute named movement. Then onClick would animate the movement variable, which is used by both the Door and its child Component (the handle.)

        See image for example;
        1132.png


        SlidingDoor[jf].skp

        Hi

        1 Reply Last reply Reply Quote 0
        • J Offline
          jharchar
          last edited by 1 Jun 2011, 21:13

          I have a question though could you explain further what /100*-36 means in door position x means.

          Thanks for your help

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by 1 Jun 2011, 21:20

            @jharchar said:

            I have a question though could you explain further what /100*-36 means in door position x means.

            Sure, it means: "divided by 100 times negative 36."

            I am using the movement as a percent. The movement variable goes from 0 to 100, so dividing it by 100 means it goes from 0 to 1. (Note I did move the Axis of the Door so it was also at the origin.

            @jharchar said:

            Thanks for your help

            Y'er welcome.

            Hi

            1 Reply Last reply Reply Quote 0
            • J Offline
              jharchar
              last edited by 1 Jun 2011, 21:28

              that makes perfect sense. is there any way to make it more realistic and have the door handle rotate first and then have the door slide? maybe with some type of animation delay. โ“

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by 1 Jun 2011, 22:18

                Consecutive animations are harder, unless I'm missing something obvious.

                What I did is double the movement from 0-100 to 0-200. Then I use IF statements to test if movement is < 100 and movement is > 100, and set m1 & m2 based on the value of movement. Basically, m1 goes from 0 to 100 when movement goes from 0 - 100, and m2 goes from 0 - 100 when movement goes from 100 - 200.

                This is one way, but I would welcome something cleaner.

                1133.png

                Hi

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jim
                  last edited by 1 Jun 2011, 22:22

                  Just a note - you could also have done the concurrent animations by placing 2 (or more) animate functions on the same onClick function, just seprate them using a semi-colon:

                  onClick: animate(X, 0, 36);animate(Handle!RotY, 0 , 90)

                  Hi

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

                  Advertisement