[NEW RELEASE] Crosshair Pack + Script

This pack provides a wide variety of crosshairs for any first or third person game.

  • Suitable for ego shooters as well as 3rd person or topdown games
  • 20 different crosshair textures sets
  • each set has a red, green, yellow and white crosshair
  • crosshair script included, with the following features:
  • toggles between 4 crosshairs
  • default = white crosshair
  • yellow = interaction (e.g. usable items, loot, etc.)
  • red = enemies
  • green = friendly units
  • individual distances at which the crosshairs are toggled can be defined
  • Size of the crosshair can be defined in the inspector via variables

https://dl.dropboxusercontent.com/u/63979073/CrosshairPack/CrosshairPack.html

Link to Asset Store: Crosshair Pack | 2D Textures & Materials | Unity Asset Store



bump

I’m not seeing any options for the 3rd person mode.

So, instead of using the camera i want my crosshair to be where my gun barrel is pointed.

I tried creating an empty game object, attached it to my barrel, rotated it to shoot out forward, attached crosshair script, and it places the crosshair in the middle of my screen.

I would like for the crosshair to be displayed at the end of the raycast, and color changed based on the masks.

Srry cannot really help you with that.

I understand your problem (I’m also working on a 3rd person game). The problem is, that raycast uses world coordinates and the crosshair textures are usually used as GUI textures so they use screen coordinates.

You could try that:

Display the crosshair texture on a plane with a transparent shader. Let this plane be on the raycast that shots from your barrel and set it on a specific distance. The crosshair is now displayed in the 3D environment.

You should use a camera that only sees this plane, otherwise the plane will collide with the other objects in your environment.

And you must modify the script in this pack, because they will always place the crosshair in the middle of the screen. The script is intended to work with screen coordinates because most games usually use this method.