Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 thenachotech1113 · Dec 22, 2014 at 04:39 AM · arrayvariablecheckforin

deleting a face of a proceduraly created mesh.

hello everyone, I was wondering if there is a way to get the index of a certain variable in a list or array. i need this for getting all of the vertices in a corner of a proceduraly generated cube and being able to change their positions. thanks a lot in andvanced

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 tanoshimi · Dec 22, 2014 at 07:40 AM 0
Share

Your question is a little unclear... all the vertices of a cube are "in a corner" - that's how you define a cube. So you can loop through mesh.vertices and change each vertex as you want. See http://docs.unity3d.com/ScriptReference/$$anonymous$$esh-vertices.html for an example.

avatar image thenachotech1113 · Dec 22, 2014 at 10:57 PM 0
Share

you are right that all the verts in a cube are in the corners, sorry for being unclear. What I ment is that, since there are several vertices per corner and in the same place, thoght that perhaps there was a way get all vertices in a certain position to move them all. thanks a lot for pointing that out.

avatar image richyrich · Dec 23, 2014 at 12:25 AM 0
Share

What is your starting point? Do you know the array index of the vert?

1 Reply

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

Answer by jmgek · Dec 22, 2014 at 07:31 AM

Two things, I have been doing work on vectors and tris for almost a month and it is extremely difficult if you don't fully understand it, it is almost impossible to understand how to work verts, if you wanted to grab a corner you need to get the vert that joins where you need the index and pull it into a simple function. To do that you could check where a bunch of your trangles meet or you could pull a random number from the array. or even use a raycast.

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 thenachotech1113 · Dec 22, 2014 at 10:59 PM 0
Share

yeah, i am noticing its a bit of a pain in the ass to create and edit a mesh in code. guess all I can do is try to understand it. thanks a lot

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

28 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Check variable in each object of array 2 Answers

How to check if a specific gameobject is in the array? 1 Answer

Getting information from an array 1 Answer

Getting A Variable From a Outside Text File 1 Answer

variables based on array.length not updating in JS 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