Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

I've had this question for a while on movement.

Discussion in '2D' started by Mozzarella-Cheese, Jan 3, 2016.

  1. Mozzarella-Cheese

    Mozzarella-Cheese

    Joined:
    Dec 28, 2015
    Posts:
    7
    So I plan on creating a falldown-like game and created an obstacle that patrols based on positions in an array. But the idea behind this and a couple other games like flappy bird is that the obstacles actually COME at you instead of you actually moving forward, right? So how would I be able to set the velocity to move forward so that it comes at you, while it patrols to certain points?
     
  2. MoonJellyGames

    MoonJellyGames

    Joined:
    Oct 2, 2014
    Posts:
    324
    I don't know how practical it would be, but I think you could just have everything except for the player in a game object that you move as needed. As long as the patrolling character's points are also in the containing game object, it should still work, I think.
     
  3. Mozzarella-Cheese

    Mozzarella-Cheese

    Joined:
    Dec 28, 2015
    Posts:
    7
    Yeah that sounds like an alright idea. What if I just animated the object with a keyframe and kept the velocity going upwards? Does that sound legit? Then I can spawn more animated objects with Invoke Repeat right?