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 /
This question was closed Jun 02, 2014 at 06:03 PM by perchik for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Charlie_Goldstove · May 29, 2014 at 10:32 PM · rangeitemsidentify

Identify all items within range C#

Hi, I'm learning Unity and trying to do my first project. I've got a problem with a rather simple mechanism I want to implement:

In a top-down 2D game I want the player to be able to fire a probe (by pressing a key) that would identify all items within its range. All it needs to do is to show the labels with the names of those items above them. I want the range to move with the player (he's not dropping the probe, but is carrying it). It should only work once though - when I press the key only what happens to be within the range is identified.

I almost did it by creating a script that spawns a child object of the player. I wanted this object to have a circle collider that would activate the labels of the objects, but the collider of a child only works on the parent collider it seems.

I'd be very grateful for any help.

Thanks! All the best!

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 DMGregory · May 29, 2014 at 11:43 PM 2
Share

Would this be helpful? http://docs.unity3d.com/ScriptReference/Physics2D.OverlapCircleAll.html

avatar image Charlie_Goldstove · Jun 01, 2014 at 11:27 AM 0
Share

I think it would, if I knew how to use it to achieve this specific outcome. :)

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by Charlie_Goldstove · Jun 02, 2014 at 05:47 PM

Okay, so I've realized this question might have been too broad. Sorry. I've managed to build this feature using http://docs.unity3d.com/ScriptReference/Physics2D.OverlapCircleAll.html

Now I'm struggling with attaching the GUI.Label to an object, but there are questions like this already.

Thanks for the help DMG!

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

Follow this Question

Answers Answers and Comments

21 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Is there a way to shorten these? 1 Answer

Something happen when object near player? 1 Answer

Choosing a random object with a certain tag 1 Answer

Random.Range statement question 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