How to create an Invader ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jacottin

Hello everyone, thank you for reading

I need to make an invader like object, meaning a sprite that’ll go from right to left of the screen, back and forth with a slight acceleration when arriving to the center; except it doesn’t go down when reaching the side limits of the screen. I guess i’ll use a rigidbody2d but how can I script that ? I looked everywhere but I can’t seem to find a tutorial for it.

If you have an idea ?

Thanks for your time and help