Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Box colliders and negative scales

Discussion in '5.4 Beta' started by Skittlebrau, Apr 20, 2016.

  1. Skittlebrau

    Skittlebrau

    Joined:
    Jan 8, 2013
    Posts:
    34
    We are trying to "flip" characters with a negative X scale. In 5.3.4 this works well enough visually, but attached colliders have strange issues. In 5.4 beta 15, box colliders seem to be actually working correctly, but somewhat ironically we get spammed with this warning for every instance of a flipped collider:

    BoxColliders does not support negative scale or size. The effective box size has been forced positive and is likely to give unexpected collision geometry. If you absolutely need to use negative scaling you can use the convex MeshCollider.

    Now I can imagine that certain configurations with negative scales do act badly with box colliders, but in our case of a simple (-k, k, k) type of scale they seem to work well enough for our purposes. Are there lurking issues even with this type of setup? Is there a way for us to disable this warning or must we go to convex mesh colliders?

    Flipping objects by applying a -1 scale to one axis is something that a lot of people want to do for certain types of games, so it would be handy if this was supported as cleanly as possible.