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

    Controller start position

    Scheduled Pinned Locked Moved SketchyPhysics
    8 Posts 2 Posters 1.0k Views 2 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.
    • R Offline
      rstearne
      last edited by

      Is there a way to make the controllers only work in a postive direction and start at zero rather than half way through their range? I have been adding servos to replicate hydraulic joints but when you hit the play button the controller allows you to move the joint back beyond it's starting point. I have found a work around by starting the model in a semi open position, but this then means I need to move all the sliders to zero before recording an animation. Any help would be welcomed!

      1 Reply Last reply Reply Quote 0
      • C Offline
        CPhillips
        last edited by

        I think this is what you want:

        slider("foo")+0.5
        
        1 Reply Last reply Reply Quote 0
        • R Offline
          rstearne
          last edited by

          Sorry, could you explain a little more? Do I need to insert the code into the joint properties some how? Thanks for getting back to me, I'm really impressed with Sketchyphysics and how it brings my models to life!

          1 Reply Last reply Reply Quote 0
          • R Offline
            rstearne
            last edited by

            I've had a better look now and understand how to use the code you supplied before, however it still doesn't do what I need it to. Adding the +0.5 moves the start position of the object but not the start position for the slide controller on screen. So if I have a servo with +90/-0 degree movement, when I hit play it moves +45 degrees because the slide controller initiates at 0.5 and not zero. What I need is a way for the on screen slide bar to start at zero - is this possible?

            1 Reply Last reply Reply Quote 0
            • C Offline
              CPhillips
              last edited by

              Try:

              slider("foo",0)
              
              1 Reply Last reply Reply Quote 0
              • R Offline
                rstearne
                last edited by

                Thanks again for getting back to me, I think I'm nearly there. The number on the control panel now goes to 0 rather than 0.5, which is exact want I wanted. The only problem is the slider on the control panel is still in the middle, so when you move it slightly to the left it jumps to 0.48 going down to zero the more you move it. Is there any way to predetermine the actual position of the control panel slider?

                1 Reply Last reply Reply Quote 0
                • C Offline
                  CPhillips
                  last edited by

                  Sorry. Thats a bug in the slider control I used. I dont think there is anyway around it. 😞

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rstearne
                    last edited by

                    I have found a small work-around, if you click on the control panel slider without grabbing it, it jumps left to the zero position.

                    Thanks again for getting back to me.

                    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