Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to Translate an object to a set amount of units?

Discussion in 'Getting Started' started by carolineb8s, Nov 9, 2023.

  1. carolineb8s


    Nov 9, 2023
    Hi all,

    I have this group of fish that I basically want to move across the screen depending on if D and if A has been pressed. They start in the center and if D is pressed I would like all the fish to swim to the right side of the screen (i.e by 10 units) and vice versa for the left. After 15 seconds I want them to return to their original position in the center.

    I have watched numerous tutorials but I am such a noob that I cant figure out how to do this.