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 Jun 15, 2013 at 04:28 PM by Fattie for the following reason:

Duplicate Question

This post has been wikified, any user with enough reputation can edit it.
avatar image
1
Question by el_kloklo · Jun 15, 2013 at 03:40 PM · collisionmeshmeshcollidertriangle

Is it possible to select the colliding triangle of meshcollider?

Hello All.

I am currently trying to understand if there is a way to detect which face of mesh is colliding with an object.

Let me explain it with the the context : I am currently using a c# geodesic sphere (found here) which I had modified A bit to get some noise.

I am currently considering this geodesic sphere as a planet, with some ground propety, like max speed allowed and so on, but which could be different from region (mesh triangle). -> This part is not implement yet.

I have some creature/units (classic colliders) walking/landing on the planet, and I want them to be affected by the property of the region there are on.

For doing this, I am searching a way to identify with which face of the mesh there are colliding.

Another way that could be ok is to get the colliding Vertex, but I'm not understand how.

Maybe that's using a bazooka for killing a fly, but I don't have any better idea.

In case if this as any impact, I am using c#.

Thanks for your time

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

  • Sort: 
avatar image
4
Best Answer

Answer by robertbu · Jun 15, 2013 at 03:48 PM

A collision provides a list of ContactPoints. A contact point contains both a hit point and a normal. Use the hit point and the normal to do a Collider.Racast(). The HitInfo will contain a reference to the triangle.

Comment
Add comment · 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

Follow this Question

Answers Answers and Comments

14 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

Related Questions

Mesh Collider for Voxels 1 Answer

All colliders no longer work. 0 Answers

Collision mesh data problem in Unity WebPlayer 2 Answers

How to setup collision with freshly generated mesh and prefabs 1 Answer

[SOLVED] Why is this procedurally generated mesh not colliding? 2 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