Add prefabs randomly, endless runner
Hey, I'm making an endless runner. I made some prefabs which are pieces of the map spawning randomly ( to have a different map each game). My problem is that I can't figure out how to place the spawning prefab so that it connects well with the previous prefab. I new to Unity so I'm wondering what would be the best option to place it?
Answer by CodesCove · Jun 23, 2020 at 11:24 PM
On way (which is not very dynamic, but robust and simple) is to add "satellite" empty gameobjects around the main gameobject (as children). These satellite transform.positions values (in world space) would indicate the correct placement of connecting gameobjects. You can also indicate the rotation if needed with these satellite points.. hope this helps.
Your answer
Follow this Question
Related Questions
How do I randomly generate two obstacles in a 3D endless runner with 1 gap to go through? 1 Answer
How to Instantiate platforms with certain space inbetween each platform (Endless Runner) 0 Answers
How to Make Game Object (Enemy) Move (Right to Left) in 2D Endless Runner Game? 0 Answers
Hi! :) i'm just newbie in Unity, 1 Answer
Error pls help 1 Answer