Hello guys,How could use a slider to rotate a box forward or backward, and the slider is 0 to 100 and begins at 50, all I can is turning forward, thank you, excuse my English.
A simple way is to use slidervalue - 50 to determine the rotation angle, so the altered value runs from -50 to +50.
--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Please post a short version of your program that illustrates the problem.
What we need is a very short excerpt of your long program that illustrates the problem you are having. For example, just the slider and some simple code that uses the slider value. We can't track through your long program looking for your problem.
Perhaps I should comment that I do read Portuguese, so although I can't write it, feel free to write in Portuguese if that works better for you.
The origin of the box is at it's center, which is specified by the pos attribute. In contrast, the origin of a cylinder is at the end. I suggest reading carefully the documentation for box and cylinder.
Maybe I should say it this way: If an object has been rotated by an amount theta2, a second rotation by an amount theta2 will result in a total rotation of theta1+theta2, whereas if you perform two changes of up of an object, the second operation is unaffected by having done the first operation.
All I can say is to study the documentation on the visual.controls module and run the VPython examples available when you start up VIDLE by opening files on the file menu.