Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

3D object looks different under parent object.

Discussion in 'Prefabs' started by kardok, Mar 20, 2022.

  1. kardok

    kardok

    Joined:
    Mar 11, 2018
    Posts:
    46
    Hi I got a plank. And there is a invisble door I am using so when character press f door barricades it self. But when I turn the plank a little bit, the thing in the picture is happining. How can I fix this? That plank was looks like other planks normaly. And when I take it out of it's parent, it looks normal.
     

    Attached Files:

  2. _met44

    _met44

    Joined:
    Jun 1, 2013
    Posts:
    633
    Hi ! you're experiencing skewing, it happens when the parent has a non uniform scaling applied and you rotate the child object. (non uniform scaling means that not all scaling axis have the same value)

    so either you change where you do the scaling or you dont rotate the child and rotate the parent instead.

    for example if the scaling is intended for a renderer you can change the model size with probuilder, or make the renderer a child object that has the scaling but no child object.

    if the scaling is intended at a collider then its the wrong way to scale your collider, solution is to reset the scaling to 1,1,1 and use the size parameter of the collider component.