PDA

View Full Version : vizact.goto/move using ABS instead of local


hosier
11-02-2009, 08:33 PM
Is there any option to vizact.goto or vizact.move to have it use ABS coordinates? I know the documentation for move says it uses local coordinates, and from my testing it looks like goto does too.

Otherwise I supposed I'll just have to calculate the ABS coordinates myself before calling the goto?

Thanks.

Aaron

farshizzo
11-03-2009, 09:03 AM
No, the vizact.goto action does not have this option. You will need to compute the coordinates yourself and pass it to the action.

hosier
11-03-2009, 01:19 PM
Is there a function in Vizard where I could take absolute coordinates x,y,z and it would calculate what the local coordinates would be for an object? My geometry is a little rusty and while I could probably work this out after a while, if Vizard had something that could do the calculations, that would be great.

Thanks.

Aaron

farshizzo
11-03-2009, 02:53 PM
Just have Vizard perform the calculation for you:
curPos = node.getPosition() #Save current position
node.setPosition(desiredPos,viz.ABS_GLOBAL) #Apply desired absolute pos
gotoPos = node.getPosition() #Get computed local pos
node.setPosition(curPos) #Restore position