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
8
Question by NZRoadKill · Jun 11, 2010 at 06:06 PM · editorgizmoshandles

What is the best way to use the Handles class to create custom gizmos.

I want to extend the editor to use gizmos to manipulte some of the properties of my game object.

I have a PhysicsZone that modifies the properties of the game character when inside of it. This zone has for example a gravity direction. I want to allow the level designer to use a rotation handle to rotate the Vector3 property for the gravity.

I have created an editor class and tried multiple methods including extending the OnSceneGUI and creating my own static function that draws gizmos.

While I have had some success in drawing and handling input to manipulate the property, it has all been trial and error. There are some problems that I can not figure out. Does anyone know of the most efficient and surefire way to do this?

Specifically use the Handles class and rotation handle to modify the value of the selected components Vector3 property?

Thank you

Comment
Add comment · Show 2
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 Max Kaufmann · Nov 01, 2010 at 05:27 AM 1
Share

Are you making sure to convert the rotation quaternion to/from euler angles?

avatar image Bunny83 · Jan 13, 2011 at 05:04 AM 0
Share

Where's exactly your problem? Like $$anonymous$$ax said you have to convert your Vector3 into a Quaternion to use a RotationHandle and convert it back to your Vector3. The Handles work similar to the GUI stuff. The difference is just that you have to specify a 3D point in space where your handle should be displayed. I've written a little tool for BoxColliders, maybe that helps ;) http://www.unifycommunity.com/wiki/index.php?title=BoxColliderUtilities

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by DaveA · Jan 29, 2011 at 05:46 AM

Have you looked at this? : http://answers.unity3d.com/questions/5275/how-to-create-handles-like-editor-gizmos-in-runtime

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 Waz · Jun 28, 2011 at 11:34 PM 2
Share

That's for runtime and doesn't use Handles.

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

1 Person is following this question.

avatar image

Related Questions

Editor Windows : Help required 1 Answer

Showing Handles in the Game View 1 Answer

Select object by selecting gizmo or handle? 1 Answer

3d Line Drawing in editor with z-sorting 2 Answers

Editor 3D tools with depth 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