"Move To" behavior problem
sebmacfly
Member Posts: 1,018
Hello Gamesalad community
I have a problem using the "Move To" behavior...
So much time when i use that behavior to move an actor from (0,0) to (250,400) (for exemple), my actor don't stop and go out of the screen...
I'm the only one who have that problem? Or can I do something to solve it?
Thanks, have a good day!
I have a problem using the "Move To" behavior...
So much time when i use that behavior to move an actor from (0,0) to (250,400) (for exemple), my actor don't stop and go out of the screen...
I'm the only one who have that problem? Or can I do something to solve it?
Thanks, have a good day!
Comments
Interpolate self.Position.X To: 250 duration: 1 second
Interpolate self.Position.Y To: 400 duration: 1 second
Much more reliable than Move To.
relative to scene
relative to actor
option
No man, it's an iPad game... (forgot to say it)
@victorkin11 :
It's "Relative to scene"
@firemaplegames :
What's the difference between "Move to" and "Interpolate" ?
Thanks
Move To is an old behavior used to move an Actor from one position to another. It's still supported so it doesn't break anybody's code, but it's buggy and Interpolate is much more powerful.
And if you couple Interpolate behaviors with Timers, you can create a basic tweening engine:
Interpolate self.Position.X To: 250 Duration: 1 second Easing: ease out
Timer After 1 second run to completion
-----Interpolate self.Position.Y To: 200 Duration: 1 second Easing: ease out
-----Timer After 1 second run to completion
----------Interpolate self.Position.X To: 400 Duration: 1 second Easing: ease out
This will let you animate things in a sequence.
You can transition menus and buttons in an out, you can create complex sequential animations, etc.
Interpolate is definitely one of the coolest and most powerful additions to GameSalad in recent months. It allows you to emulate the motion tweening capabilities of Flash.
I highly suggest you check it out!
Can i choose the speed movement? what's the best way to make a very fast movement?