- Home /
Bullet Script Help
I have a script which is from the fps tutorial on the unity website which allows you to shoot a bullet prefab, but what it dosent do is spawn my bullet prefab at the end of my gun, please can anyone help? For some reason I cant get the script to look correct on this question even with the code sample button so here is the link. http://download.unity3d.com/support/resources/files/FPS_Tutorial_1.pdf
Answer by Clunk · Sep 19, 2011 at 04:37 AM
Make a small cube at the end of your gun and turn off the "Mesh Collider" component to make it invisible. Attach the fire script to that cube.
This is a round-about way of making an Empty, which can be made from the GameObject menu.
it spawns at the end of my gun now but it go downwards ins$$anonymous$$d of firing straight please help.
Answer by henry96 · Sep 19, 2011 at 06:55 AM
oh!!! I think the axis-z of your spawn point is facing down. That's why the bullet is going downward. So try to rotate the spawnpoint to make the z-axis facing forward!
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Timing Between each Gun Shot 2 Answers
Mouse look alteration? 1 Answer
Animation On Mouse Click 1 Answer
Basic Shooting Game 1 Answer