WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Dynamic Position and Radius of Sphere (https://forum.worldviz.com/showthread.php?t=3659)

hotshotiguana 03-23-2011 12:37 PM

Dynamic Position and Radius of Sphere
 
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 .setPosition and .setScale commands to change the position/scale of any node object. The documentation contains many examples and tutorial showing how to use these commands.


All times are GMT -7. The time now is 05:59 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC