Controller start position
-
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!
-
I think this is what you want:
slider("foo")+0.5
-
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!
-
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?
-
Try:
slider("foo",0)
-
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?
-
Sorry. Thats a bug in the slider control I used. I dont think there is anyway around it.
-
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.
Advertisement