- Home /
What is Most Efficient for a Flat Wall, Etc.
So in my 3d game I need some flat invisible walls with no texturing but a collider, and also some flat objects that I am putting on top of stuff without colliders. (Think like a poster on a wall, or a path on a ground that doesn't need a collider, but is just for show.)
So I have been wondering what is the most efficient way of doing this? The two ways I have been doing it is with Planes for the posters, etc. and then flattened cubes for the invisible walls. (with their mesh render off) I could mix or swap these but idk which works best. I would think the planes cause they are flat, but it looks like their mesh is complex. While the cube is still "3d" its mesh looks rather simple. Any ideas on which is better? Or any other ways of doing this? Thanks!
Answer by Cherno · Oct 21, 2014 at 07:18 PM
I would suggest creating a simple 4-vertex plane in your 3d modelling applikcation and import it into Unity, and use the mesh as a MeshCollider for the wall colliders. This would be the most efficient way because you only have as many vertices as you need. Posters can also be done with the imported plane, this time of course as a proper gameobject that has a MeshRenderer and Material of the poster art applied to it.
Answer by MrSoad · Oct 21, 2014 at 07:31 PM
Using a plane as a collider is maybe not the best idea, it can be quite easy to pass through a mesh collider attatched to a plane. You are better off using a box collider with some depth to it. For adding posters, paths etc look at the available Decal Systems on the asset store, they do exactly what you need and will avoid the Z fighting issues that you will probably get from doing it Cherno's way.
While it seams there is no "Right" answer to this question I appreciate the help, and thumbs up!
Also, link for the lazy to the decal assets?
Just put Decal into your asset search. A free one is the first to pop up. I've not used one for a while and the one I did use(which was free) is now $95 and I could not see a free version of it. Will have another look.
I would try the first free one. Edelweiss one def seems not to have a free limited option anymore :(
I've not used the other but may get it sometime soon(day or so) and have a play with it. It seems like I need a new one...
Right, just looking on my own I saw some, just wanted to know which you recommend.