add moveToward function for sprites