|
Is it possible to detect the vertex hit and its neighbors by RaycastHit?
(comments are locked)
|
|
Loius is almost right. It's the triangle index. By multiplying it by 3 you get the index of the first vertex index. It should be like this: Those are the 3 vertices that surround the hit point. Keep in mind that hit.triangleIndex only works with a MeshCollider. No other collider will give you that information since they are pure mathematical colliders which are not based on triangles.
(comments are locked)
|
|
RaycastHit has a property called triangleIndex that tells you what the index of the triangle that was hit. I can't be much more concrete about this since I still couldn't even "hit" my procedural mesh, but that's other story. When I have some success, if you are still doubting about this I will try to be more helpful. That would be an index into the mesh.vertices array:
Nov 28 '12 at 10:15 PM
Loius
(comments are locked)
|
