You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it's possible to have the appearance of movement by just repeatedly using the event "setPosition", the official way to move across the universe as opposed to repeatedly teleporting, is by using the "move" event. The "move" event is just a proxy for "setPosition", but other components that deal with moving and collisions will intercept the "move" event to apply their special logic.
Events
setVelocity (x:Int, y:Int)
addVelocity (x:Int, y:Int)
reduceVelocity (x:Int, y:Int)
increaseVelocity (x:Int, y:Int)
reverseVelocityX ()
reverseVelocityY ()
move (x:Int, y:Int)
update ()
Details
Update
Each update the velocity component gives the entity a "move" event with the x and y speed of the velocity component.