Quantcast
Channel: Questions in topic: "contact"
Viewing all articles
Browse latest Browse all 75

Is there any way to find the mesh triangles which are colliding with another mesh?

$
0
0
I'm working on a task which requires me to highlight the perimeter of collision and the perimeter will change according the collision depth. For that I need to find the mesh triangles which are colliding with another mesh. Keeping in mind that both colliders are mesh colliders with **convex** property on. Can someone suggest me how to approach this problem? I'm attaching some reference screenshots of a particular shader from [this site][1]. Initially this seemed to work fine but I had two issues. First is that I'm using orthographic camera and this shader works for perspective camera. Secondly even in perspective camera mode if I apply it to all models they tend fail at rendering the intersection contour. I don't know why because I don't have any experience with shader writing. So any suggestion? ![alt text][2] ![alt text][3] [1]: https://gamedev.stackexchange.com/questions/158243/surface-depth-intersection-shader [2]: /storage/temp/125586-screen-shot-2018-10-04-at-115507-am.png [3]: /storage/temp/125587-screen-shot-2018-10-04-at-115528-am.png

Viewing all articles
Browse latest Browse all 75

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>