Search Unity

Door Pivot Problems

Discussion in 'Editor & General Support' started by Mark-Paul, Sep 16, 2013.

  1. Mark-Paul

    Mark-Paul

    Joined:
    Feb 8, 2013
    Posts:
    46
    SOLVED:
    I have changed my tool handle setting from pivot to center!!! :rolleyes::?


    Hi Guys

    Hope you can help as this was driving me crackers last night and eventually just gave up and started to work on something else.

    I have a bunch of doors that are using pivots, simple enough. Now they animate using the pivot perfectly but when i click on the pivot and rotate it manually, the door rotates like i have clicked on the door mesh, not like it should with the pivot.

    The pivot is on the right hand side of the door which is fine, but as soon as i drag the door mesh into it, the pivot rotate point moves to the center of the mesh.

    I have it set up like this

    DOOR A
    --TRIGGER
    ----- PIVOT
    --------DOOR MESH

    It worked perfectly to begin with, and enabled me to setup all my doors, but now after going back to the project the pivots will not rotate correctly.

    Can anyone enlighten me to what i may of done? It feels like a project setting i may of changed, but tbh, im grasping at straws as it could be anything

    Thanks in advance for any help :)
     
    Last edited: Sep 16, 2013
  2. Akshay_ROG

    Akshay_ROG

    Joined:
    Sep 13, 2013
    Posts:
    48
    Have you used a hinge joint? You don't need pivots if you have an animation (rigidbody, collider, center and mesh update with respective animation) but still - Pivot is child of DOOR A, pivot must be inheriting DOOR A's rotation try making DOOR A pivot and let mesh be child along with the trigger,
    DOOR A(pivot)
    --TRIGGER
    --DOOR MESH
    if nothing yet...

    Recommended : hinge joint(documentation) use anchor to set pivot and connected body to wall or whatever the door is attached to or just leave it null. Set angle rotation limits and use force and damping. http://unity3d.com/learn/tutorials/modules/beginner/physics/joints
    (OR)
    use your 3d app > edit mesh mode(look for the objects center Vector3 in the view, I use blender and to change pivots or center I do: edit mode>move the mesh to desired position) set pivot to right side and middle, know your animation and world axis of your app. Set Unity orientation to PIVOT(if you're using this method only)
     
  3. Mark-Paul

    Mark-Paul

    Joined:
    Feb 8, 2013
    Posts:
    46
    Ah brilliant Thanks.

    Joints definitely seem to be the way to go.

    It was more the fact it worked fine, then decided not to work. Was very frustrating as slowed down my workflow.
     
  4. TedBundo

    TedBundo

    Joined:
    Sep 7, 2017
    Posts:
    1
    I had the same exact issue when setting up my pivot doors and this was the only solution I could find online so thank you!
     
  5. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,981
    Dont dig up a 4 year old thread next time please, and read the forum rules before posting to avoid mishaps like this.
     
  6. Logan123451

    Logan123451

    Joined:
    Feb 28, 2020
    Posts:
    4
    watch me dig up a 10 year old thread