Search Unity

Every Object-Vector3 Position ist set to 0,0,0

Discussion in 'World Building' started by ThomasKosl, Jul 26, 2021.

  1. ThomasKosl

    ThomasKosl

    Joined:
    May 25, 2021
    Posts:
    1
    Hello,

    i am working on a configurator to build houses. I got the RoomArchitect Asset.

    When creating the Walls on runtime, every Vector3 Position is set to 0,0,0.
    All Parents are set to 0,0,0 also.

    When adding BoxCollider via Script its of course centered to 0,0,0.


    So my Question is:

    How can i get the real World Center position of every Wall i have, so i can tell the BoxCollider where its position is.


    I Added a Screenshot to give a small overview. If any further Details needed please tell me.



    wd cloud url
     
  2. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    The position shown in the inspector is the local position, i.e., the position of that object relative to the parent.

    But Box Colliders work in local coordinates too. If you put the box collider on the wall, it should Just Work.