What are you trying to achieve?:
I set the polygon’s X coordinate to (Dir1+((Dir2)t+(Dir3)(-4.0))*Velocity,0). Dir1 Dir2 Dir3 Velocity is set in Excel.
With this setting, I want to move Polgon routinely from left to right and from right to left.
I have set the below code in code component.
if Dir1+(Dir2t+(Dir3)(-4.0))Velocity>=-2.7:continueRoutine=True
else:continueRoutine = False
if Dir1+(Dir2t+(Dir3)*(-4.0))*Velocity<=2.7:continueRoutine=True
else:continueRoutine = False
What specifically went wrong when you tried that?:
With above code, the movement from left to right will end the routine at a specific X coordinate. this is good. However, the right-to-left movement routine is not presented in the first place.
I dont understand what to do.