- Home /
Problem with dynamic wall
Hello i Have a problem, i want to make dynamic wall by drag a mouse, but if i scale it i get a wall behind the original.Its some option to make long wall which look like this small original ?
You could instantiate the small original prefab at regular intervals(width of section) in relation to the mouse drag, however you would have to hide some of the most recently instantiated one with a depth mask shader of some sort(which would reveal this section in relation to the drag). You can probably use this to do what you need :
http://wiki.unity3d.com/index.php?title=Depth$$anonymous$$ask
Answer by YoungDeveloper · Nov 24, 2014 at 09:04 PM
The counter question is how exactly you want it to stretch. It's either per any (small values) or predefined certain chunks. Most likely you'd want to choose predefined chunks.
Use raycast from screen register hit on ground
You'll need list of structure objects
On click event Instantiate part
store parts in list or check for nearby (depends on your need)
give possible "next-step" solutions if build is in process
I've created something similar, but for editor. Check it out for reference how it might work technically. http://gyazo.com/d2b6eb8810671b74a70119ad1eca9219
Hello,
Can you please share your source code to achieve the effect you are showing in the link?
Your answer
Follow this Question
Related Questions
How can I dynamically changed where buttons are placed? 2 Answers
gameObject not dynamically scaling via the update method 1 Answer
Create a Dynamic Wall 2 Answers
Problem with dynamic wall 0 Answers
Programming dynamic barriers 1 Answer