PDA

View Full Version : Dynamic Position and Radius of Sphere


hotshotiguana
03-23-2011, 12:37 PM
Is it possible to change the position and radius of a sphere after it is created? sphere = vizshape.addSphere(radius=r,color=c,pos=(xPos,yPos ,zPos))
sphere.dynamic()

For example, I have a slider and when I change the position of the slider I want to retrieve data based on that new slider position and change the position and radius of the above created sphere with respect to the new data.

If this is not possible, is there a way to delete the previous sphere and just create a new one each time?

Any help would be greatly appreciated.

Thanks,
Chris

farshizzo
03-23-2011, 12:53 PM
You can use the <node>.setPosition and <node>.setScale commands to change the position/scale of any node object. The documentation contains many examples and tutorial showing how to use these commands.