How to keep a certain distance between actors

FaarisFaaris Member, PRO Posts: 66

So in my game, there are three lanes and blocks move up them, and there is a ball that has to avoid all of the blocks, but if there are 3 blocks in a horizontal row, it is impossible for the ball to get through, is there a way to maintain a certain distance between two of the blocks so that it is always possible for the ball to get through?

Thanks

Answers

  • tiger27tiger27 Member Posts: 127
    edited July 2015

    @Faaris I think all you have to do is spawn an actor in 2 out of 3 random lanes. Ex.:

    Every 5 seconds
    Spawn Actor at random(1, 3)*(How wide your lanes are)+(the x position of the first lane)
    replicate 1 time
    

    Try it out!

Sign In or Register to comment.