Please use ‘code’ tags when posting code (to preserve formatting). As for the lag, I don’t think there’s enough info there to say for sure what the problem is. It could be draw-call related, or it could be physics related.
Does each object have its own collider? If so, what type of collider is it? And is each ‘hexagon’ object being rendered separately?
Can you post a screenshot showing what you have currently?
oh im sorry for the misunderstanding im bad explaining hah.
I havent done any code yet im just trying to think of a way to do this as this is a rather complex thing i have never done before and i need ideas on how to accomplish it.
Oh, I see (I thought you’d already tried it and were seeing lag).
If you need ideas on how to implement the system, the more information you can give us about how you want the system to work, the better. Maybe you could create a mockup in a modeling program showing what you want the game to look like (or just draw a picture of it and post the image). That along with a description of how the interface is supposed to work would make it easier to provide useful feedback.
Looks nice - did you mock that up in a modeling program?
As for implementing it, how is the interface supposed to work? Also, what are the collision detection requirements? (I know you included some info in your original post, but your meaning didn’t seem entirely clear.)
Interface will be simple and clean, it will be a bar with a few selection boxes for the different guns, each “gun” will be able to set down a different tile. I think i can get most of that once i have the told system down really, and ill be using a basic capsule for the characters collision detection.
So I take it your question then is, how to go about implementing that? If so, I imagine it’ll probably require some experimentation. I don’t know how large of environments you have in mind; for something like in your mockup, probably any reasonable method will work, but if you have much larger environments in mind, you might start to tax the physics and/or rendering system.
One way to proceed would be to start with the most obvious approach: a single object for each hexagonal block with an appropriately shaped hexagonal mesh collider. If your environments get larger and/or you start to run into performance problems, you may need to look into combining meshes to reduce draw calls, combining vertical stacks of blocks into single colliders, etc. (It really just depends though - even though your mockup conveys a lot about what you have in mind, there are still a lot of variables involved.)
There is a bug and you need to Destroy the old MeshCollider, make a new one, then put the new mesh into it.
Also read about Mesh.CombineMeshes() in the script guide.
The Scripting guide is now your best friend, you should spend several hours skimming it to see what is there.
If you are a beginner programmer, this is a very difficult project.
Lots of trial and error coding ahead.