Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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 /
avatar image
2
Question by Shadow0599 · Jan 08, 2016 at 08:08 AM · first-person-controllerfirst person controllercrosshairfirst-personfirst person

How do I make a crosshair?

I'm making a first person game where you pick up and move objects around, and I've made a circular crosshair, put it on a plane, made it a child of the First Person Controller, but whenever I look around in the game, the crosshair goes through walls, despite its closeness to the player, and it won't move up or down. What am I doing wrong here?

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 ZefanS · Jan 08, 2016 at 08:38 AM 1
Share

Is there a particular reason you need to have the crosshair in World-Space? If not, making it using a UI Image would make things simpler.

avatar image Shadow0599 ZefanS · Jan 08, 2016 at 02:54 PM 0
Share

It doesn't need to be in the world space, and a UI Image would be much simpler, but I'm not sure how to do that. I'm still a new user.

avatar image dandelo99 · Jan 08, 2016 at 09:12 AM 0
Share

Yes it is best way GameObject>UI>Image

avatar image dandelo99 dandelo99 · Jan 08, 2016 at 10:08 AM 1
Share

there is a video on youtube https://www.youtube.com/watch?v=zwuVa-UA-Oo

2 Replies

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

Answer by felixfors · Jan 08, 2016 at 11:13 PM

Create a Canvas by following thees steps. 1. click on " GameObject" top of the unity window and then UI > Canvas 2. Select the canvas in your Hierachy window and click on " GameObject > image. 3. Import your crosshair texture to unity and change the texture type from " Texture" to "Sprite 2d and UI" 4. change the UI image component to your crosshair texture. 5. select your canvas and change the "Ui Scale mode " from Constant Pixel Size to " Scale with screen size"

Comment
Add comment · Show 3 · 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 Shadow0599 · Jan 09, 2016 at 04:45 AM 0
Share

That seems like it would work, but my crosshair is off-center and ridiculously big, as well as incredibly faded and barely visible. I'm new to this, so I'm sorry if I'm missing something.

avatar image felixfors Shadow0599 · Jan 09, 2016 at 11:21 AM 0
Share

Well if it is off centered you most have done something wrong, because if you follow my steps above it will automaticly be in the center of your screen as defualt and the size is really easy to fix afterwards, just change the width and height of the rect transform component of the image object

avatar image Shadow0599 felixfors · Jan 10, 2016 at 07:24 PM 0
Share

Never$$anonymous$$d I was able to figure out how to work the UI canvas. Thank you!

avatar image
0

Answer by abandon_games · Apr 20, 2021 at 02:31 PM

For anyone having issues getting your crosshair/reticle image to appear in the middle of the screen with the steps above, try using a Panel (so hierarchy is Canvas > Panel > Image)

here's a good, quick tutorial on creating a dynamic crosshair/reticle - https://www.youtube.com/watch?v=-7DIdKTNjfQ

and this guy created 200 crosshairs that you can download for free - https://kenney.nl/assets/crosshair-pack

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

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

7 People are following this question.

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

Related Questions

Im new at unity and im trying to make a first person game. I already have a mouse movement script for the camera but i dont know what to do for the walking script. 1 Answer

FPS Controller Confusion... 0 Answers

Third Person Camera Movement control. 2 Answers

How to change rigs spine rotation? 2 Answers

On looking to far up or down Random Rotation bug 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