Two collider at a GameObject fail

Hi,

When you create a game object with two box collider components with their center values set to e.g. (x=10/y=0), then the second collider is placed incorrectly at (x=0/y=0) (the center value isn't taken into account). Only the first collider is placed correctly.

Tried adding a third collider (this time a circle collider), and the same happened. It was misplaced too.

See the following images:

(Editor = everything okay)


(Runtime = fail)



Cheers,
John

Comments

  • I think the following observation of me is related to this:

    Create a gameobject with a "ts box collider 2d" component attached and add a "sprite renderer" component and select an image to be able to see what is wrong.
    Make this gameobject a prefab.
    Duplicate this gameobject (so that you have now two instances of this prefab) and set their transform to different x positions.
    After starting the game the second prefab's transform gets either the position of the first or both are misplaced. (Both happened to me in different situations)
  • Hi @John05, thanks for all the help and reports, we didn't support multiple collider on the same object yet, you are supposed to use only one, we have a task to adjust this issue.
  • Hi @JeffersonHenrique,
    oh, then I'll stick to creating sub-gameobjects to achieve what I want.
    You're welcome, keep going your great work. :)