Composite collider doesn't work properly

Hi everybody,
first of all sorry for my English. I’m using a Composite collider 2D for the foreground and I haven’t any kind of problem with the player. But when I implemented an attack to shoot little arrows I start to have the issue. Sometimes the composite collider doesn’t work and the arrow pass trough. There aren’t gaps in the collider; I’ve already changed the “collision detection” of the arrow prefab from “Discrete” to “Continuous”; in the script, I tried both OnTriggerEnter and OnCollisionEnter but it doesn’t change anything. I think it’s a bug of the composite collider, as if it doesn’t have enoght time to ceck the collision. Any tips? Thanks :smile: :thinking: !

arrow%20collider

Hi Stefano,

Unity cannot handle fast moving objects well. What you could do is to set the collision detection mode of your arrow’s Rigidbody2D to “Continuous”. Maybe that fixes the problem. If not, you could tweak some of the values in your Physics2D settings. Be careful, though, because that could have an negative impact on the performance.

Hi, I’ve already changed the detection mode but it still gives me the problem. Thanks, it’s not so important, I’ll leave as it is.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms