Search Unity

Resolved Changing origin with empties help

Discussion in 'Animation' started by Cosmology27, Mar 4, 2023.

  1. Cosmology27

    Cosmology27

    Joined:
    Jul 11, 2019
    Posts:
    61
    I know how to get my FBX stuff into Unity fine, but I'm having a very specific problem.

    Normally in Unity, if I want to control something from a certain point, rather than the object's origin, I just create an empty, drag it to where I want to control from, then make the object a child of the empty.
    Example: So I could have like a huge axe, but the origin is up near the head, so rotating it looks weird, but if I make an empty, drag it to the bottom of the axe handle, then make the axe a child of the empty, now when I rotate the empty it makes it look like the axe is chopping.

    I've done this before (it works especially well with stuff like health bars), but it's not working right now. I have a cannon with a shooting animation, but I want to be able to rotate and tilt it, to direct it's shots. Right now, because it's long, the origin of the object is by default out in the middle, so if I rotate it it doesn't work right. So I totally unpacked the FBX, created an empty within the base object, dragged it to the part where the barrel would rotate from, and then made the barrel a child of the empty. However, the origin of the empty changes when I do that! It goes to where the origin of the object is.
    So I tried making a sphere so there would be a real object, but it's the same thing. The children are forcing the origin of the parent.

    How do I get this to work so I can manipulate origin points on the FBX like I want?
     
  2. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    599
    Hey, just a thought, but it could be that you have your origin set to "Center" and not "Pivot."

    Make sure that where it says "Pivot" is actually set to Pivot:

    Pivot.JPG

    This is Unity 2020, might look different for you.
     
    Cosmology27 likes this.
  3. Cosmology27

    Cosmology27

    Joined:
    Jul 11, 2019
    Posts:
    61
    Thanks! That's exactly what it was. Works great now, thanks for the help!
     
    Unrighteouss likes this.