Up/ down movement - best way

CapCap Member Posts: 225
edited November -1 in Working with GS (Mac)
Hello,

imagine you have some actors moving up/down, left/right or even in a wave motion. Let's stay with up/down movement. Let's say we have waves moving up and down. The actor would be 480 pixels wide and - let's say- 60 pixels high.

At the moment my way to do this is:

if wave.position.y <=0 then
-> accelerate toward y=60

If wave.position.y >=60 then
-> accelerate toward y=0

Is there a more efficient way to do this? Is the option described in the Wiki (includes a timer) better?
http://gamesalad.com/wiki/how_tos:gsc_pacing

Or should I rather use interpolate?

Thanks for hints.

Comments

Sign In or Register to comment.