Page 1 of 1

Easing Effect with Move command?

Posted: Mon Sep 27, 2010 3:39 pm
by xfratboy
In my quest to make things move in Rev, I'm trying to figure out if there is a way to create a more fluid 'easing' effect with the Move command? I understand there's some other ways of moving things such as setting the LOC of an object. I studied the wonderful example by the tactilemedia folks; http://www.tactilemedia.com/site_files/ ... se.rev.zip , but I could never figure out how to repeat for X times using the 'set LoC' way of moving things.

Currently I'm doing this:

Code: Select all

-- init some variables
put the width of this stack into tWidth
put tWidth /9 into tWidthEase 
put the height of this stack into tHeight
put tHeight /9 into tHeightEase
put 0 & "," & tVerticalMiddle into tmyLocalLeftMidScreen
put tWidth & "," & tVerticalMiddle into tmyLocalRightMidScreen

-- Move something X times
Repeat for X times
move img MyImage from tmyLocalLeftMidScreen to (item 1 of tmyLocalRightMidScreen -tWidthEase),(item 2 of tmyLocalRightMidScreen) in 2000 milliseconds
wait 2 milliseconds with messages
move img MyImage from the loc of img Customimage to tmyLocalRightMidScreen in 350 milliseconds  --Ease To Edge
wait 2 milliseconds with messages
move img MyImage from tmyLocalRightMidScreen to (item 1 of tmyLocalLeftMidScreen +tWidthEase),(item 2 of tmyLocalLeftMidScreen) in 2000 milliseconds
wait 2 milliseconds with messages
move img MyImage from the loc of img Customimage to tmyLocalLeftMidScreen in 350 milliseconds -- Ease to Edge
wait 2 milliseconds with messages
End Repeat
Doing it this way sort-of works to some extend. It definitely has an easing effect but it's more like how a roller coaster slows down at the end of a ride.

Re: Easing Effect with Move command?

Posted: Mon Sep 27, 2010 4:14 pm
by Klaus
xfratboy wrote:... but I could never figure out how to repeat for X times using the 'set LoC' way of moving things...
I think the trick is to use "send XYZ..." in short time intervals and to calculate the new position in XYZ before setting the new loc.
If I remember correctly Scott does it this way in his demo.


Best

Klaus