Project Genesis – adding target reticle

Posted: August 19, 2013 in Game Programming and Design, Uncategorized

So I had to take some time to learn about some ways to draw lines and what not in my project.  I found a package called Vectrosity which was being touted as being pretty good so I dropped the money down for it.  

There is, of course, a bit of a learning curve.  However, once I figured out how to get my rectangle drawn I was pretty happy with the end result.



The only issue I see right now is that the reticle may be a bit too “soft” in appearance.  I got the appearance totally by accident.  


I was messing with some different particle effects as up to this point, the rectangle was just a solid white rectangle with ugly join corners.  I found the green/blue soft particle and applied it as the material for my rectangle and boom… it was perfect other than I may need to figure out how to make it glow a little brighter to bring the contrast up.

I will mess with that in the future.  For right now, I can target the object.


One thing I ran into was that after I would fly by the space station, the rectangle would then render itself on my screen anyway without the station.  It would then shrink slowly… basically applying itself in reverse.

To get around that I had to research how Unity knows if an object is being rendered or not onscreen.  Turns out it is very easy.  Note the code in my IF statement…

If DrawTarget is true AND if the renderer object has its isVisible property set to true… draw the reticle.  Otherwise do not. 

Boom… problem solved.

I am about finished with this phase of the project.  I am about ready to start messing around with a backdrop and applying the earth and the moon as this station is set as a moon platform.  


  1. baelknight says:

    One thing I have to look at will be cycling through valid targets with the keyboard. Right now you just left click the thumbstick on the xbox controller.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s