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
0
Question by maroonrs2 · May 11, 2012 at 02:09 PM · collisionraycastinputguitexture

GuiTexture as crosshair as scroll over to activate things

Hello,

I have been making my game and getting it all situated. Now, i'm at the place were I need Input.GetKeyUp(KeyCode.E) to work for me when my gui scrolls over something. I have had a idea about a pole sticking out of my character's face thats invisible as a 'ray' but it would be hard to use considering that colliders only last one frame. As for, and including, that single thing about frames is when i use Input.GetKeyUp(KeyCode.E) it might not work.

The gui is at the direct center of the screen. I'm at a lost.

Comment
Add comment · Show 1
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 maroonrs2 · May 11, 2012 at 03:16 PM 0
Share

Oh and i will not use Input.GetButtonDown();

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Piflik · May 11, 2012 at 06:14 PM

Make a raycast on GetKeyUp down the center of the screen, and when it hits you use the item that your crosshair is hovering over (the item the ray hits).

Comment
Add comment · Show 7 · 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 maroonrs2 · May 12, 2012 at 03:03 AM 0
Share

A not-all-pointless answer. I am asking how?

avatar image ByteSheep · May 12, 2012 at 03:30 AM 1
Share

So basically you want us to provide the finished code for you.. Do you know how to check for Get$$anonymous$$eyUp and how to create a raycast? If you do then just write the code, if you don't then search google, unity's script reference and this site. Is there a specific part that you'd like help with?

avatar image maroonrs2 · May 12, 2012 at 05:22 AM 0
Share

no explain what it is... are people really that stupid?

avatar image syclamoth · May 12, 2012 at 05:28 AM 0
Share

If you want someone to write your game for you, maybe you should consider employing a competent programmer. If you want help on this site, you need to stop being rude to everyone who answers your questions.

avatar image maroonrs2 · May 12, 2012 at 07:24 AM 0
Share

Im sick and tierd of you following me. Stay off troller.
As for the people who do want to write the game for me, stay off too.
I'm asking a simple question and getting answers that deal with otherworldly things.
I'm not being rude. Well... who the fuck cares. Come at me.

Show more comments

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Falling object touch 0 Answers

Samsung 42" Touch Screen: Touch response issues 1 Answer

How to ignore a raycast collision with a particular object? 4 Answers

Align to grid in runtime problem 1 Answer

Move object with mouse without passing through colliders 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