Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Compound Colliders not working in 2D Unity?

$
0
0
Hello everyone! I've got issues regarding 2D compound colliders. I tried really hard to find an answer before posting this so I hope it's not a repost. So, I've got a scene with a Shape2D falling on a Quad, and a Shape3D falling on a Cube. This is how Shape2D and Shape3D are structured in hierarchy: **Shape2D** - rigidbody2D (not kinematic), OnCollision2DScript - Quad - box collider 2D - Circle - circle collider 2D **Shape3D** - rigidbody (not kinematic), OnCollision3DScript - Box - box collider - Sphere - sphere collider My collision scripts look like this: void OnCollisionEnter2D(Collision2D c) { Debug.Log("Collision Enter 2D!"); } and similarly for 3D. **Problem**: When Shape3D falls on Cube it logs "Collision Enter 3D", but when Shape2D falls on Quad, it logs nothing. I suspect Shape3D is behaving like it should since it's a compound collider (or is it?). But what about Shape2D? Thank you!

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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