- Home /
Draging mouse to create a square shaped room
I am working on a game in which player gets to build a base but it is not main part of the game. I have used several approaches for that, most of them require user to place a floor , then corner pillars , then walls and so on , I have used amazing add on called Easy Build … and it really does all of it efficiently … but after playing my game ,I realised that base building takes way too much time and it is not supposed to be the main focus of the game …. player placing each component down separately takes too long to finish the base …. So I would like to speed up this process by placing whole room down rather then each piece.... yet I want this placement to be dynamic not a simple instantiation of premade prefab of whole room...
I would like a Player to drag a mouse and draw a square shaped gismo/box that will represent room and then with mouse click to instantly place down rooms that has floor , roof and 4 walls ….
each wall should be made of several wall prefabs, depending how big room player has made... lets say if each room prefab is 1 unit, them room 4x4 size should have 4 corners and 16 wall pieces , 4 walls on each side.
this approach is used in games like theme hospital and software inc... please see picture below
If anyone can tell me how is this done? or if there is a Unity Add on that can do this , please let me know… any pointer or tutorial would be really appreciated … Thanks in Advance....
Your answer
Follow this Question
Related Questions
Problem instantiating a prefab, and storing a reference to it. 1 Answer
How to instantiate an object on multiple positions? 0 Answers
Intantiated objects being created but being invisible...[PICTURES] 1 Answer
why is it slow to instantiate 0 Answers
instantiating prefab does not rotate child objects correctly? 1 Answer