Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
3
Question by vexe · Aug 17, 2014 at 12:43 AM · editortoolshandles

Changing collider's center changes the position of the position handle? wtf?!

So I've been messing around with custom editors for colliders trying to control their center by means of a position handle. I commented out my custom editor so now I've fallen back to the default way Unity draws its colliders (box, sphere, etc). But now I'm faced with a very odd behavior... it seems that if I change the center of a collider, the transform position handle changes its position! - Made a video.

I have absolutely no idea why it's happening... I'm pretty sure my custom editor is commented out... Is this the normal behavior? I don't think so...

Any ideas?

Thanks.

Comment
Add comment · Show 4
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 vexe · Aug 17, 2014 at 12:51 AM 0
Share

Why does weird shit "always" happen to me? :/ All I did in my custom editors is just copy-paste Unity's editor code, and add my position handle bit:

     if (Tools.current == Tool.$$anonymous$$ove)
     {
         var c = target as SphereCollider;
         c.center = c.transform.InverseTransformPoint(Handles.PositionHandle(c.bounds.center, Quaternion.identity));
     }

Could I have broken something permanently? I tried restarting Unity, no dice.

avatar image vexe · Aug 17, 2014 at 01:03 AM 0
Share

Tried different scenes/projects, same. Please don't tell me this is the normal behavior. I lost track of what it is normal and what isn't...

avatar image ultimatetyranno · Aug 17, 2014 at 01:31 AM 0
Share

does this happen on every mesh (for example every sphere, cube etc.) ? Did you intend this sphere in your script? If yes, post all the necessary parts for this sphere of the script, so i can help you.

avatar image vexe · Aug 17, 2014 at 01:42 AM 0
Share

Thanks for the help. It was a pivot issue, got it sorted.

1 Reply

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

Answer by vexe · Aug 17, 2014 at 01:18 AM

OK that was very disturbing. But at least I'm not crazy. The issue was with the pivot mode, I changed it to "Pivot" and everything's working as expected as opposed to F'ed up when it's "Center". Who uses Center mode anyway?!

Comment
Add comment · Show 1 · 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 ankgoyal · Apr 23, 2018 at 11:54 AM 0
Share

I am facing a similar issue. Can you please elaborate the solution? $$anonymous$$ore specifically what changes did you make in the code or did you just change the pivot mode in unity interface.

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

24 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is it possible to add new tools, like transform/rotate/scale? 2 Answers

How Can I Move an Object in the Editor by MousePosition? 0 Answers

Editor Script Handles.Label problem. Labels don't move with gameobject 1 Answer

Handles.FreeMoveHandle + multiple points selection 0 Answers

Editor Windows : Help required 1 Answer


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