Hello everyone,
I just wanted to ask this question before I started coming up with my own way in case there’s a better way to do it.
I have a puzzle game I’m creating, eventually for iPhone, and the player will be creating triangles as part of the puzzle. I’m using LineRenderer objects to create the lines for the puzzle, and that’s working out fine.
However, when they’ve completed a triangle I’d like to have that triangle light up, or pop out on the screen somehow to visually show that they’ve completed that triangle. In other words I’d like to fill the triangle shape that I created with LineRenderers with color or something to “pop out” for the player to see.
What’s the best way to dynamically do this in your opinion? Should I just draw a mesh, or would there be another, better, way of doing this?
I’m using Unity Indie at the moment, and I’m aware that some of the drawing functionality is not available in the Indie version.
Much thanks for any suggestions or tips/tricks you might be able to share.
Kind regards,
David
I think I’ve figured out a way to do this, at least in my own way. I’m still a newbie with Unity and game programming in general, so I’m sure this isn’t as polished as most of the developers around here, but I think it will do what I need 
I’ll create the triangles in a 3D package, just basic ones, and size them appropriately for the triangles I’ll need within the puzzle.
Then, when the puzzle piece is complete, I will make the triangle appear, maybe anmiate it so it zooms into place, then use a nice material/shader for looks as needed.
Of course if anyone else has a better idea than that let me know.
After I create my first game I’ll share everything with everyone to see what you think.
Cheers,
David
What about some sort of particle effect? Still, if I was going to go the particle effect route, I’d probably want to still use a mesh emitter which would, of course, necessitate the mesh anyway.
Hello Maker16, thanks for the input 
I was looking at particle effects, actually, with a mesh emitter, and I may actually go that route.
I actually haven’t used particle effects yet, just gone through the documentation and read about them, so that might be a great solution once I become more familiar with it.
But I might want something more “solid” to fill the triangle shape, not sure if particle effects will do what I need, exactly.
But I’ll have to play with the two methods to see which one works out the best.
Can the player create completely arbitrary triangle shapes? If that’s the case, creating a mesh at run time will be far simpler than matching modeled triangles.
Hello tomvds,
No, the player won’t be creating triangles, they’ll just be tracing them out on the game board. The game board will have different puzzles that are already drawn out.
I agree that creating a mesh at runtime would be a good way to do it. I’m still new at thinking in terms of game development, and new at Unity development specifically.
I appreciate your thoughts, thanks!
[/quote]