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 /
This question was closed May 09, 2015 at 10:35 PM by joshua-lyness for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by joshua-lyness · Mar 02, 2015 at 01:16 PM · raycastmeshcitytheory

I have no idea what to title this...

I am planning on making a city building game that uses a grid, and you click and place buildings on a plane which is on the same y as the grid (so it looks like it is lining up with that.) The problem is to do with the plane though. Some "buildings" like the subway station, and road, should go into the ground, rather than sit on top. For the subway station, the mesh goes through the plane.

So the question is, how do I make the plane underneath / through the subway station go "invisible" or delete?

If I made it a separate plane for each space, and then a raycast deletes that plane when the subway station is above it, it was use a lot of processing power to make every plane (4 vertices per plane, 500*500 city zone.) So how do I go about this?? any ideas are super useful, urgently need some sorta solution.... Thanks

Comment
Add comment · Show 3
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 joshua-lyness · Mar 02, 2015 at 01:17 PM 0
Share

sorry if I seem like a noob, I suppose I am really....

avatar image maccabbe · Mar 02, 2015 at 01:19 PM 0
Share

Are you planning to have 500*500 meshed objects?

avatar image joshua-lyness · Mar 02, 2015 at 02:06 PM 0
Share

I'm not sure whether it is a good idea to,but the grid size for the game is 500 * 500. The only solution I can think of is to make each of those grid spaces a plane. So yes, there would be.

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by maccabbe · Mar 02, 2015 at 01:25 PM

The biggest problem with making a plane per grid space is that you will have 500*500 gameObjects so I would look up how to create meshes. You will probably want to separate the grid into chunks so you can temporarily hide things that you aren't using and make refreshing the mesh faster. I would look at a procedural generation tutorial. Here is the first part of a voxel tutorial that will show you how to create meshes and split space into chunks.

http://studentgamedev.blogspot.com/2013/08/unity-voxel-tutorial-part-1-generating.html

You can also reduce the number of faces if they are solid color using some of the techniques described at this tutorial http://0fps.net/2012/06/30/meshing-in-a-minecraft-game/

Comment
Add comment · Show 2 · 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 joshua-lyness · Mar 02, 2015 at 01:58 PM 0
Share

how would I make the mesh turn invisible when something needs to go below it though?? if they were separate meshes, you could delete them, and it would work but would take up a lot of processing power, and RA$$anonymous$$. so that's not really a good idea. I get what youre saying, but how would u make certain faces of the mesh turn invisible? and how would you detect if something needs to go through the mesh?

avatar image joshua-lyness · May 09, 2015 at 10:35 PM 0
Share

Ok, I've done a bit of research, thanks for the pointer!

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why is raycast not working with mesh collider 0 Answers

Mesh Collider Issue(?) - Raycast (ScreenPointToRay) Appears to Collide on Nothing 0 Answers

Dynamic mesh positioning with Raycast intersection... 0 Answers

Mash Manipulation like in real world? 0 Answers

Raycast on mesh deformed by shader 0 Answers


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