- Home /
Question is off-topic or not relevant
Paint Grid Texture
For my game, players will be able to build on a ship. On initialization, a series of raycasts are done to find where structures can be built. How can I paint the grid only on these areas?
I store the information in a bool[,] and I can convert the index of each bool to a local position relative to the grid. How do I paint a texture only on those places? Should I use a terrain for this job? or something like Texture2D?
Note: The texture I want to draw is a 1x1 grid block. On the image below, it is tiled 40 times X and Y using the Self-Illum soft edge unlit shader. The box around it is the gizmo drawn collider.
Answer by Superrodan · Jan 16, 2015 at 08:59 PM
I'm not sure how exactly you're painting your grid, but one way to do it might be to paint the grid with a projector.
You can tell a projector to ignore the default layer, and then you could set any gameobject you want to project the grid onto to a different layer.
Oh, cool. How do I make the projector project exactly the needed tiles?
Based on how you're deter$$anonymous$$ing where you can and can't place objects, I'm honestly not sure. I'm still a beginner so I apologize if I've led you down the wrong path.
No problem. I'm just need some help brainstor$$anonymous$$g.
Follow this Question
Related Questions
Allign grid with Splatmap 0 Answers
Is it possible to export base texture from unity terrain? 1 Answer
Allign a grid on top of the Splatmap grid in Unity 0 Answers
animating terrain texture question 1 Answer
Terrain not unloading texture. 0 Answers