View Single Post
  #1  
Old 07-16-2013, 09:47 AM
fordprefect fordprefect is offline
Member
 
Join Date: Oct 2012
Location: Vienna, Austria, Europe
Posts: 39
understanding vizact.moveTo

Hello,

it seems I have problems understanding this moveTo. What I'd like to achieve is to have two actions that move a node one unit (meter) along it's Y axis up or down. That way I can use them on different nodes in the object, regardless of the original position of the node. So I created
Code:
_ceilDist = 1
_ceilMode = viz.REL_LOCAL

_actYplus = vizact.moveTo( [0,_ceilDist,0], time=4, mode=_ceilMode, interpolate=vizact.easeInOut)
_actYmin = vizact.moveTo( [0,-_ceilDist,0], time=4, mode=_ceilMode, interpolate=vizact.easeInOut)

def cmdOpenCeil(parName):
	car.getChild(parName).runAction(_actYplus)

def cmdCloseCeil(parName):
	car.getChild(parName).runAction(_actYmin)
My problems are:
  1. When used as shown above, the distance the part is moved is more that one (meter) by far!
  2. When used as shown above, the interpolation is starting gradually, but at the end the motion is cut off, without slowing down. Same with (examples) vizact.easeInOutCircular, .easeInOutExp, .easeInOutSine, .cubic(0.1,0.6), .easeOut, .backOut
  3. When used with different time values (e.g. 6 seconds for plus direction) then the speed is not changed, but the distance is increased

Same effect when using addAction instead.

What point am I missing here, and is there a better (working) approach?

BR Walter
__________________
21 is only half the truth.
Reply With Quote