Performance Question - 2D sprite movement

Hey,

I wanna move a bird from a specific position to an another specific position. So I have the two min and max positions and the bird. What should I do? Adding a box collider to the min and max empty gameobjects and check if the bird is colliding with them or should I check the x position if its greater or less than the x pos of the min or max gameobject? (The flipping and the movement are already done)

Thanks!

That will work, but you could make an animation for it, too. It will be easier to control, especially if you want to make it more complicated by adding any oscillations or other visual sauce, or approach the end point from a curve rather than a straight line or something.

Edit: Noticed in your title you’re wondering about performance-- I wouldn’t be worried about it at all unless there are a high number of these birds with interactive physics. If you’re unsure, there’s always the Profiler.

1 Like

Okay, thanks! <3