Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by johnniks · Dec 21, 2015 at 03:21 PM · transitioncrosshair1st personswitch cameras

1st to 3rd person crosshair?

Hello, I'm a bit stuck on my interface. It works just fine in 1st person, but when I switch cam to 3rd person my crosshair gets completely useless, as the player no longer shoots towards the crosshair like he does in 1st person. And I don't really know what to do in order to fix this... The way I've set up the 1st person crosshair, is just that I've made a canvas and tossed in a crosshair at the middle of it. But that doesn't really work for my 3rd person view... any ideas how to fix this or at least is there a better way to go about this, so that it would work for both 1st and 3rd person view? Thanks :)

EDIT: maybe I should do it in a different way if I want it to work for both 1st and 3rd person? I just want a crosshair, that is in the middle of the screen, that when shooting from either 1st or 3rd person camera, shots towards that area/spot where the crosshair is :)

Maybe Canvas is bad way going about doing this???

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by KdRWaylander · Dec 21, 2015 at 03:31 PM

Hi,

You'll have to transpose to your case (don't attach it to your cam but to your character) but this is one good way to make a crosshair !

https://www.youtube.com/watch?v=LLKYbwNnKDg

Comment
Add comment · Show 8 · 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 johnniks · Dec 21, 2015 at 04:26 PM 0
Share

Right now I haven't attached it to anything, I just have the Canvas in my Hierarchy and then the crosshair is a child of that canvas.

So I guess it's sorta just lying on top of the screen, you know? Like if it's a transparent image that is just put over the scene of the game.

EDIT: maybe I should do it in a different way if I want it to work for both 1st and 3rd person? The video you linked me doesn't seem to do what I want. I just want a crosshair, that is in the middle of the screen, that when shooting from either 1st or 3rd person camera, shots towards that area/spot where the crosshair is :)

avatar image KdRWaylander johnniks · Dec 22, 2015 at 08:32 AM 0
Share

Don't use canvas to implement a reticle (crosshair), that's a wrong way of using canvas.

The video does show what you want to achieve, but indeed without using canvas. Here are the macro steps, see the video for details:

  • draw a crosshair on Gimp / Photoshop / ...

  • create a plane on which to put the crosshair, the crosshair is now an OBJECT in your scene

  • attach the reticle as a child of your player (and not to a cam like in the video)

  • script it as so the reticle is always facing the player and appears to have the same size all the time (raycasting and stuff, the script is in the video)

  • tweak a shader so the reticle is always rendered on top of everything (in the video again)

  • enjoy the possibilty of changing the active camera an still have the reticle since it's attached to your player hence no dependent on which camera your using to render the scene

avatar image johnniks KdRWaylander · Mar 28, 2016 at 04:11 PM 0
Share

Sorry about the late reply, but this doesn't work as I want it to; when I shoot with my spaceship in 3rd person, then the shots/laser doesn't fly according to the crosshair... any suggestions?

Show more comments
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

32 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mechanim animation doesn't play 2 Answers

How do I show "Duration in" and "Duration out" for the transition graph in the inspector window 0 Answers

Mecanim: 2-step transitions in a single update (skip intermediate state) 0 Answers

Circle crosshair that fits the bullet spread 1 Answer

How do I make it so that my First Person Controller script allows for movement in all directions? 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