Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Oliver1135 · Dec 12, 2014 at 02:27 AM · 3dtilemapmap making

How to represent a dynamic tile like map in Unity

I am not that familiar with unity and my question is quite newbish in terms of what I want to accomplish which is a game that I can represent and interact with like a tiled based system

to help understand I have an example:

I have a 3x3 block of gameobjects on top of a single 'floor' gameobject which represents a 3x3 game 'map'

the functionality I have is as follows.

if I click on the game object I wish to destroy, it is destroyed using the following code

     if (Input.GetButtonDown("Fire1"))
     {
         RaycastHit hit;
         var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
         if (Physics.Raycast (ray, out hit, 100.0f))
         {
             Debug.DrawLine(Camera.main.ScreenPointToRay (Input.mousePosition).origin, hit.point);
             GameObject.Destroy( hit.collider.gameObject);
         }
     }

Here are the before and after screenshots

before

alt text

after

alt text

my question is how can I replicate this functionality using a 256x256 map where I am not using GameObjects (as I cant use 65536 game objects to represent my map). The 'wall' sections need to be collidable. I'm quite stuck with this problem and I'm not particularly sure what I should be even searching for to get answers.

I'll update the post as required as I'm not sure how to explain this better.

Thanks for taking the time

Because a picture explains a thousand words using my modest talent at Microsoft Paint I have done an artistic impression of what the tile based map 'thingy' would look like if I carved a 3x3 hole in the middle of the map with the camera looking down it.

Edit: It wont let me put more than two pictures up so my artistic talent will have to wait another day

destroyed section of wall.png (99.2 kB)
3x3 wall on box stretched 10 x 10.png (401.2 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by VesuvianPrime · Dec 12, 2014 at 02:29 AM

You're going to need to get very friendly with procedural geometry generation and the Mesh class.

Take a look at the Jarheads game.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Oliver1135 · Dec 12, 2014 at 02:31 AM 0
Share

Thanks, I'll be taking a look starting there but I'll hold off accepting answer to see if I can get a few sources. Fingers crossed eh

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How would you convert 3D terrain into a 2D tilemap? 1 Answer

Pixel-Perfect Tilemaps on 3d objects (SabreCSG) 0 Answers

Unity Probuilder mesh brush and grids. 0 Answers

Can I tilemap with 3d prefabs 0 Answers

Creating a 3D Looping Map 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges