Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 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 dissidently · Mar 30, 2011 at 09:42 PM · meshfindcenteredge

Find centres of the sides of a Hexagonal Mesh in UnityScript? Possible?

Imagine a Hexagonal Mesh. North and South are Horizontal. Is there a way to find the centre of the South East and South West facing edges of a Hexagon Mesh in UnityScript?

Or must I create bones/rigging in 3ds that sits right on those spots?

http://oi52.tinypic.com/141r1uc.jpg

Have a look at the above image link, hopefully this shows the spots I'm trying to find.

Forum Link: heres the same thing in the forum: http://forum.unity3d.com/threads/84024-Finding-midpoints-of-edges-on-a-hexagonal-mesh.

Comment
Add comment · Show 1
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 Bunny83 · Mar 30, 2011 at 10:26 PM 0
Share

Any screenshots? Because hexagonal is a 2d term so it's the shape but not a volume and a Hexahedron would ba a cube ;). A screendhot that shows your mesh and the spots that you want to find would help. http://en.wikipedia.org/wiki/Hexahedron

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DaveA · Mar 30, 2011 at 10:26 PM

Are you talking a single hexagon? You can do just about anything with a mesh:

http://unity3d.com/support/documentation/ScriptReference/Mesh.html

So get the edges you need and find their centers I'm guessing. Or the centroid of the whole thing, I'm not sure what you're asking: a value which is the average of those edges or a value for each edge?

Comment
Add comment · Show 6 · 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 dissidently · Mar 31, 2011 at 07:45 AM 0
Share

Imagine a Hexagon, 6 tris, 7 verts (there's one in the middle) It's rotated so that the top and bottom edges are horizontal.

I want to locate the middle of the edges on on the South East and South West of the Hexagon. How do I know when I've located the correct verts to start making the calculation to find those middle points? Are the verts numbered somehow on import of the mesh?

avatar image DaveA · Mar 31, 2011 at 03:28 PM 0
Share

Not ordered, and another post here says that they get reordered on import anyway. If this will really be that simple a mesh, you could construct it via script, then you'll know precisely what's what.

avatar image dissidently · Mar 31, 2011 at 04:43 PM 0
Share

attached an image to help show the spots I'm hoping to discover.

avatar image DaveA · Apr 01, 2011 at 12:25 AM 0
Share

Some ideas, none of them do I like: You could make some 'dummy' objects at the points you need, just empty transforms really, children of this object. You could find the center of the thing then Raycast in plane of the hexagon in the heading of the sides you want. Ech! You could construct the entire thing in code, then you know exactly what's what. You could make each side (or the sides you care about) submeshes. Perhaps each with a different material or something to differentiate it.

avatar image dissidently · Apr 01, 2011 at 03:39 AM 0
Share

The Dummy objects idea is the one that I'm at right now. However there's still the issue of actually finding that mid point of the edge. In order to do that I need know the location of the two vertices that define that edge, in Unity. And that's my problem. I don't know enough about coding to find those vertices and then figure their mid point... so I keep thinking adding 12 more vertices is the solution, along with bones from a mid point to the object reaching to and touching each of those verts. 12 more verts, 24 more tris, 12 bones and a hip later its not the lightweight object it was

Show more comments

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

No one has followed this question yet.

Related Questions

Tile texture along edge of mesh 0 Answers

Create edges for vertices(JS) 1 Answer

Displaying precision edges of a mesh at runtime? 0 Answers

Creating a 3D Plane Mesh Without a Filled Center 1 Answer

Set anchor point for procedural mesh? 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