Hello guys and welcome to another tutorial, this time it is a kind of special!
Because we are going to create a building system like Rust (so it will take a few parts)
Some parts of this system will be changed later on in the tutorial.
So don’t directly panic if something isn’t like Rust!
Also I didn’t player a minute in my life Rust, so some controls are maybe different. But I think the most important parts are exactly the same as in Rust.
But this is the first part and we start with showing the preview of the object!
So I hope you guys like it!
(all the scripts witch I’m reffering to are here)
Unlit alpha shader script:
http://answers.unity…nlit-alpha.html
The script I coppied:
currentpos -= Vector3.one * offset;
currentpos /= gridSize;
currentpos = new Vector3(Mathf.Round(currentpos.x), Mathf.Round(currentpos.y), Mathf.Round(currentpos.z));
currentpos *= gridSize;
currentpos += Vector3.one * offset;
currentpreview.position = currentpos;