My project requires a lot of barbed wire, but you should be able to interact with the wire. The first problem was how to create something that doesn’t cost too much to render.
Cross-Plane quads with normals
Thanks to Al from GameDevHQ for the idea. A segment of barbed wire consists of horizontal and vertical planes. Each plane shows a flat material of the barbed wire. Since the material contains texture-data such as normals, then it gives a pretty good illusion of being 3D. Still a little work needed but the prototype looks pretty good.
The next problem/feature was I want to be able to run the barbed wire along a custom spline. So, first step, created a custom editor to allow the level designer to create splines.
Spawning along the Spline
This is where I’ve finished today, but I think it’s looking promising. The level designer can select the prefab they want to use to follow the spline and Press the custom inspector ‘Spawn Objects’ (or clear if they want to start again). This builds something approach a barbed wire spline.
The spawn positioning algorithm is too basic at the moment, but it feels like it is do-able.
Let’s see what tomorrow brings.