![]() |
|
|
|
#1
|
|||
|
|||
|
Hi Jeff,
that code works ok as it is. Also, when I adopt it to my script, it does the trick and moves the node by 1 meter. So thank you for the workaround. ![]() But
Therefore I'd like to repeat: what am I missing to understand how .moveTo works? ![]() When I use your script as a basis and try out .moveTo again Code:
import viz
import vizact
viz.go()
viz.add('dojo.osgb')
ball = viz.addChild('beachball.osgb',pos=[0,1,4])
_ceilDist = 1
_ceilMode = viz.REL_LOCAL
_actYplus = vizact.moveTo( [0,_ceilDist,0], time=1, mode=_ceilMode, interpolate=vizact.easeInOut)
_actYmin = vizact.moveTo( [0,-_ceilDist,0], time=1, mode=_ceilMode, interpolate=vizact.easeInOut)
vizact.onkeydown('3', ball.addAction, _actYplus)
vizact.onkeydown('4', ball.addAction, _actYmin)
def debugPos():
print 'posi:', ball.getPosition()
vizact.ontimer(3.3, debugPos)
Giving time=2 does not lower the speed but extends the distance, e.g. 61.55 for .easeInOut Using parameter speed=1 instead of time=1 in the code above yields same result, BUT using speed=.1 results in y=301.75 while speed=10 yields y=4.50 even more confused the more I try, Walter
__________________
21 is only half the truth. |
![]() |
| Tags |
| action, moveto, positioning, subnode |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|