I'm making a normal FPS game and some of my scripts are saying " found ''." and I know this is a simple problem but i need some help. Also, if someone could help me, how do you make a "gun" show up on the screen?
Adding the Crosshair
First step is to add in the crosshair.
Note: Do not make the crosshair a child of anything that moves.
Adding the Gun
Getting the gun to follow the camera is just as easy as getting your camera to follow your player.
Avoiding a Clipped Gun
This will have the gun still visible even though it passes though walls and objects.
Adjusting the Crosshair
This is a pretty neat trick to finding the center of your screen, and thus moving your crosshair to the right place.
And there you have it! By now you should have:
answered Jan 07 '11 at 05:27 AM
For a crosshair, you could create a simple GUI Texture. To do this,
To make the gun GameObject move with the camera, you want to make it a child of the camera (or vice versa) in the hierarchy.
Hope this helps!
answered Nov 13 '10 at 12:53 AM
If a script is telling you ' found "." ' it means that you have an error in syntax. Usually, you've missed a semicolon or parenthesis somewhere and made the compiler get confused. If you post a code sample I can help you fix the syntax.
answered Nov 13 '10 at 01:03 AM