- Home /
Grid on Ship
I want a grid to cover my ship only and nothing else. Currently I'm using a plane for the textures (1x1 grid blocks tiled 40x40) but I can use a terrain, quad, or whatever is needed to make this work. Below is a visual description of what I need. Does anyone know a clean solution? Thanks many for the help.
You asked this earlier and I wasn't sure it would work for what you needed because it seems you want to turn parts of the grid on and off based on where you can build or not. Is that still the case?
EDIT: The reason I ask is because if you just need a grid on a ship then this tutorial can $$anonymous$$ch you how to use projectors. The only issue is that the grid will be on the entire ship whenever you have the projector on. https://www.youtube.com/watch?v=44Nad3QwuoA
I want to initialize the grid and not touch it again. You suggested using projectors but I'm still not sure how I can do this with a projector. $$anonymous$$y method of deter$$anonymous$$ing where to place objects is irrelevant. I just want to convert a position in local space to where I want the grid to be rendered.
Basically what you would want to do is import a blob shadow projector into the scene and give it your grid texture. Then tell the projector to ignore the default layer. Create a new layer from the dropdown menu in the upper right called "Spaceship" or something along those lines and apply that to your spaceship's gameobject (and if it asks, all of the spaceship's children too).
I mocked this up real quick. The box on the right is a normal object and the box on the left is my "spaceship" object. I can move the projector around to make the grid appear differently as well.
O$$anonymous$$G THAN$$anonymous$$S! I'm going to try it and keep you in touch with how it goes.
One problem I had with this is that the ship can have some variation in height. How could I project within the outline of the ship not factoring in the ship's curves? Is there a way I can project onto a plane shaped as the ship?
Do I have to instantiate a quad on every position a grid block is located?
Answer by jpthek9 · Jan 17, 2015 at 10:24 PM
Instantiate a quad on every position from a raycast.
Your answer
Follow this Question
Related Questions
Creating a 68x68 grid of trigger cubes 2 Answers
to attach a Blood gauge to enemies 2 Answers
How to render a quad without gameobject? 2 Answers
RTS Movement and grid questions 0 Answers
making a grid of buttons each with different textures 1 Answer