Question by
ewatman2004 · May 14, 2020 at 12:18 AM ·
unity 2dy-axis2d collision
When obstacles collide with tag move to y axis which is randomly chosen out of 3 values
I am making a game where objects are spawned in three lanes. The current code i have the object spawner moves across all three lanes. This is good but object end up in the middle of the lanes. I am trying to spawn the objects further forward and have them collide with a divider with a tag "divider". When they collide the obstacle needs to randomly choose between the y coordinates 2.5, 0 and -2.5. I cannot figure out how to do this. Does anyone have any ideas what i could do?
Comment