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 alpeyek · Oct 01, 2012 at 08:16 PM · collidermeshprocedural meshmesh colliderstick

Sticking object on mesh

Hello. Please help me. I need to stick an object on mesh collider properly. What I mean. A draggable object contains rigidbody and a box collider, another object consists of procedural-generated mesh and corresponding mesh collider (plus kinematic rigidbody). I need to stick first object on the second one and orient it accordingly (i.e. if it touches the left edge make it's up axis look to the left and so on).

The best thing I could test was to lock the moving if the object touches mesh. I tried to treat the deal with getting `collider.ClosestPointOnBounds()` but it seemed to me not to work properly. What should I do? Please help me.

Comment
Add comment · Show 4
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 Fattie · Oct 02, 2012 at 08:20 AM 0
Share

do you mean you want to use .parent ???

avatar image alpeyek · Oct 02, 2012 at 05:49 PM 0
Share

No, it's simple. $$anonymous$$y case is far more complicated - I need to STIC$$anonymous$$ an object to arbitrary mesh collider. In the other words, I need to find such points on the mesh collider that I could use as the control points, find a normal and position object accordingly.

avatar image Fattie · Oct 02, 2012 at 06:15 PM 1
Share

i really don't know what you're asking. the term "STIC$$anonymous$$" means nothing and it's not a term of art in the scene or anything I've heard, sorry! heh.

do you mean you want to actually modify the mesh of the large object to include the new object?

I don't know what "stick" mean, if you use .parent that absolutely - positively - definitely STIC$$anonymous$$S the item on the other item so they will never ever separate. it's as if it is one mesh.

avatar image alpeyek · Oct 08, 2012 at 05:23 PM 0
Share

Sorry, I used a wrong word approach maybe. What I mean is to snap an object with box or sphere collider on the surface of mesh which is generated by script.

0 Replies

· Add your reply
  • Sort: 

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

10 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

Related Questions

Why is my mesh collider not the same shape as the mesh of the object? 1 Answer

Technique to find a mesh intersecting with a primitive solid without using colliders? 0 Answers

MeshCollider (concave) doesn't trigger OnCollision functions 0 Answers

add mesh to trail renderer and MAKE IT SOLID !! 1 Answer

Pushing a mesh with mesh collider 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