Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
8
Question by Mz3 · Jun 12, 2015 at 12:48 AM · c#cameragameobjectmeshfps

Move gameobject pivot

Hi, I have a gameobject with a very odd pivot point (at least that's what i'm presuming it is), and so when I rotate the object in my script it rotates on that point so I'd like to adjust it's position to a more practical place

alt text

I have tried using the SetPivot point script provided on the unity3d community wiki but it only works on meshes (?) and when I try and use it on my hands mesh it always turn out like so; alt text

Any help is much appreciated

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

6 Replies

· Add your reply
  • Sort: 
avatar image
28
Best Answer

Answer by iagoccampos · Jun 12, 2015 at 02:04 AM

You can't change the pivot, but you can create a custom pivot, to do this create an ampty GameObject and attach whatever GameObject you want to this empty GameObject.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bellarose143 · Apr 15, 2016 at 02:24 AM 4
Share

i just tried that and it didnt work... I set the empty objects transform where i want it to pivot... then attach the new object to the empty object as a child... but as soon as I do, the empty objects transform now is the center of the new model I just popped in

avatar image Fightknights bellarose143 · Apr 15, 2016 at 10:12 PM 9
Share

I had the same problem. Googled a bit more. Found the solution on Stackoverflow

To summarize: Check the pivot setting at the top of your editor. $$anonymous$$ine was set to: "Center" and "Local". You should set it to: "Pivot" and "Local". Check the link for screenshots.

Hope it helps

avatar image Mz3 Fightknights · Jun 07, 2017 at 12:43 AM 2
Share

I know I'm a bit late but I wish I could accept your answer as this is the solution that worked best for me.

avatar image Studio923 · Apr 16, 2020 at 06:56 PM 0
Share

Wish I could upvote this more! Thanks guys this fixed it for me! To summarize:

PROBLE$$anonymous$$: Could not move pivot point on gameobject. SOLUTION: Create new empty gameobject > parent desired gameobject to empty

::Notes:: $$anonymous$$ake sure you're in "Pivot" and not "Center" mode -- toggle button located at the top next to local/global Also make sure to change pivot point BEFORE parenting your gameobject, or else you'll need to unparent all your gameobjects again

avatar image
6

Answer by Hartnett · Apr 26, 2018 at 03:15 PM

Just wanted to update this with a simple solution that now exists since I was looking for the information as well and I just kept coming across the parent object work around.

  • Probuilder, which is a unity asset right off the asset store, that I believe they said was going to become standard in the future, has the ability to set the pivot point of an object in editor.

  • When you have an object selected clicking on "Freeze Transform" will set the pivot point of the object to 0,0,0 in world space while keeping the other transform information of your mesh exactly where it is in world space. So just take the object that you want to correct the pivot of to near 0,0,0, align it how you want and then click Freeze Transform. Very Handy, and officially supported by unity.

  • There is also a button to set the pivot to the meshes center of mass if you just want to do that quickly.

  • An added benefit of downloading probuilder is that you can edit meshes in unity as well, which is obviously great.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AnomalousX12 · Jun 13, 2018 at 04:15 PM 1
Share

Probuilder seems like a great tool and I'm glad you've gone around updating all the different threads with this question. Unfortunately for me, however, I haven't been able to get your solution to work for me. I have a 3D object which is a star that I imported from Tinkercad which is enormous and off-center by default, and I have a single script that manages all of the shapes in my game. That's easy when every other shape has an accurate transform, but my star does not because of its transform coordinates that are not actually reflective of the shape.

When I "probuilderize" my star as you mentioned in another thread, then move it to where I want it to be as 0,0,0, then hit "Freeze Transform," the star shrinks! And none of the coordinates are reset to 0. They all stay the same. No errors or issues pop up. I just have no idea why it doesn't work. I can take a video if you'd like.

avatar image alexbrigham · Oct 30, 2020 at 05:29 PM 0
Share

Awesome, it just happened that I created my object in Probuilder. This comment helped enormously!

avatar image
6

Answer by kferkic · Mar 03, 2019 at 08:47 PM

Some export formats (like Collada) include the pivot point of the object.

As a workaround, you could open the model in your preferred 3d program (like Blender), set the pivot point there and export the model to Unity. In Unity, you can set the tool handle position to 'Pivot' alt text


unity-pivot-tool-handle.png (8.3 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by hally · Nov 18, 2019 at 05:36 PM

I found this video tutorial which helped me to resolve the problem with a pivot - Unity Fix (move and rotate) Origin Pivot Orientation And Position

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Clickpointgames · Dec 31, 2016 at 03:28 PM

Well the custom pivot does work you just need to make sure any scripts that move the player are attached to the empty game object and the original object has not got them scripts and is made into a child of the empty game object.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Weird FPS Camera 0 Answers

Camera to follow a target within a circle? 1 Answer

Gameobject to stay within the view of the camera - c# 3 Answers

Extents of a Compound GameObject (C#) 2 Answers

I want to put main camera floating 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges