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 /
  • Help Room /
avatar image
4
Question by Proggin_Barnes · Jan 20, 2012 at 09:15 PM · overlapsphere

See the size of an overlap sphere

Is there a way to visibly see how large an overlap sphere is? As far as I can tell it given no indication of units for the radius given and since its an invisible physics object I can't really see how large it actually is. It keeps being to large and I can't tell how big it really is.

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

2 Replies

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

Answer by Thom Denick · Jan 20, 2012 at 10:00 PM

You can use the Gizmo DrawSphere to see the sphere in the Scene: http://unity3d.com/support/documentation/ScriptReference/Gizmos.DrawSphere.html

That needs to go in the OnDrawGizmos or OnDrawGizmosSelected methods.

 private void OnDrawGizmosSelected() {
     Gizmos.color = Color.red
     //Use the same vars you use to draw your Overlap SPhere to draw your Wire Sphere.
     Gizmos.DrawWireSphere (transform.position + m_Position, m_Radius);
 }

If you want to see it in the Player, the easiest way would probably be to Instantiate a Sphere prefab at the exact same dimensions of your OverlapSphere. I do not think OverlapSphere has any kind of built in way of doing this.

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 AlecGamble · Aug 16, 2016 at 05:53 PM 0
Share

Just to add to this you don't need to instantiate the sphere in the scene. You can just click the gizmos button at the top of the game window near maximise on play, mute audio and stats.

avatar image Kevin__h · Dec 11, 2016 at 01:29 PM 0
Share

Instantiating a sphere with the same dimensions as your OverlapSphere doesn't work, the OverlapSphere is bigger.

avatar image
3

Answer by IwishIcanFLighT · Dec 03, 2014 at 10:37 AM

For some reasons, I couldn't get OnDrawGizmosSelected() to work. But OnDrawGizmos() did the trick just fine !

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 flixtgi · Jul 10, 2021 at 06:36 PM 0
Share

You probably forgot to select your gameobject in the scene view.

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

9 People are following this question.

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

Related Questions

How to write an overlap sphere 2D 0 Answers

OverlapSphere ignoring objects instantiated into scene? 0 Answers

OverlapSphere Detecting Colliders Outside of Range (Pooled Objects) 1 Answer

Can you use OnCollisionExit with an OverlapSphere? 1 Answer

Find Objects Which is Out Of OverlapSphere 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