Love heart
GamePrefabs? Click the button: 

Home > Products > Smart Crosshair Pack

Smart Crosshair Pack


Preview demo

Preview

Compatible with: Unity 2.6 and 3.0

This script is a powerful but simple script. In it's most basic form, you can add a reticle (crosshair / target) to your project for a first person shooter or third person shooter in as little as 10 seconds. The reticle will resize based on the distance of the object the reticle is over.

One of the more advanced features is you can easily set it to change to a different reticle based on the tag of an object. Make it turn red over an enemy, make it turn to a hand over an interactive object, make it change to a steering wheel for vehicles.

The other big feature is that with just attaching a second reticle script, the reticle changing script, and one line of code, you can make it change to an entire different set of reticles. This is useful if you want to change the reticle to look like a tank's reticle, or if you are holding a sniper rifle or shotgun or grenade launcher. It's very easy to set up, and only takes one draw call.

Check out the demo and video to see more.

Video: http://www.youtube.com/watch?v=w4RM4Tzoz-Q&fmt=37 (default is HD, best viewed in HD)

Update

I've recently added a content update to this. Now it can also be used as a mouse system. By simply checking a box, the crosshair will now follow the mouse rather then being stuck in the center of the screen. I've also added 3 mouse cursor textures (just a blue, red, and green cursor) to be used as examples. You can make it whatever image you want still.

This update will be useful for 2.5d shooters, as well as things like RTS and Point and Click adventures. This update comes at no extra cost, and like the entire script is extremely easy to implement.

Added on October 30, 2010 in Other

Buy

Indie license 10
Commercial license 30

Please login to buy this product.

What license should I pick?

Comments

log in to comment


Lefti0

Hello, for a 2d top/down view game with no person controller available, which works only by clicking on game objects: can this script be somehow bound to or work like a mouse pointer?

on January 25, 2011

Caliber_mengsk

@lefti0 Sorry for the long reply (they sent an email which I did reply to, but wasn't quite exactly the same) You would have to modify the script slightly. In the script I have a part that says "Screen.width/2" and "Screen.height/2", just replace those points in the code with the mouse cursor positions, and turn off the regular mouse and it should work fine.

on February 8, 2011

Caliber_mengsk

@Lefti0 I've updated the script doing exactly what you were asking for, so everyone can now enjoy it. ^__^

on February 14, 2011

Craigerz

How easily can this prefab be combined with the FPS one? I trust I can just swap out the controller code from one to the other, or rather the reticle code over to the other FPS prefab? And is this C or JS? Thank you!

on March 24, 2011

Caliber_mengsk

@Craigerz

You should just have to remove the GUITexture from the Crosshair game object inside of the GUI gameobject inside of the FPS kit game object. XD Lots of game objects. Anyway, after removing that from the crosshair object, you should just have to drag my crosshair onto it, set the textures and your good to go. I say should though because I don't own the FPS kit, and I'm only able to base this off of the video that they have attached to it.

It should be just that simple, replacing a GUITexture with a prefabed script and setting the textures. This script is a JavaScript file. Most of my scripts will be because I find it easier to follow then C#, but it's all personal preference.

Either way, I don't think it should take any coding. Just simple right clicking, left clicking and dragging. I hope this helps in your decision.

on March 24, 2011

Craigerz

Thats perfect! Im also more ept in JS so, double-perfect. Ill grab it from you in a moment. Thanks again.

on March 24, 2011

Caliber_mengsk

@Craigerz ^___^ Glad I could help.

on March 24, 2011

Emopreben

This is exacly what i was looking for.XD Will definately be buyin' soon as I get payed at work.:b

on August 29, 2011

Dylan56477

this prefab saved my head from blowing up due to programming stress! lol

on December 31, 2011