- Home /
Basic First Person Shooter Weapon Setup!?!?!
Hello. I'm getting REALLY annoyed by this. People think I'm an 'Idiot' because I've been searching for 2 weeks and writing posts to help me work out Weapon Set up on an FPS! Yet no-one can 'Be assed' to answers them!!
All I want is to find out how you guy's set up the camera on an FPS. I'm trying to find out how to show hands gripping the weapon and how to configure reload animation's along with genuinely firing the weapon.
I REALLY don't get- how the weapon is on an offset to the right - yet bullets from the weapon, always hit the target in the center of the screen - despite the target's distence - without rotating the weapon!!
I see people model hands and animate them attached to the weapon. they do the same for the whole character model. So how do you show the player that you've thrown a grenade- show your enemies that you've thrown a grenade- all with one grenade!! So bloody!! ERGH!!
Answer by syclamoth · Oct 05, 2011 at 02:19 PM
People don't like to answer questions that sound like you are asking them to write your game for you
You set up a camera using a first-person controller- all well and good. For the gun model, first you need to make a badass hand gripping a badass gun like a badass, and import that into Unity. That done, just make it a child of the first-person controller and offset it a little, so it doesn't look like an even more obvious penis extension.
The 'bullets always hit the crosshair' problem is a well-known and pretty much solved issue. There are several ways of achieving this, depending on exactly how your guns work. For instant-fire weapons where you don't want to calculate slow projectile trajectories, you could cast a ray from the crosshair point on the screen to a point in your world (i.e, where the bullet would hit), and then fake it by drawing your 'bullet' effect coming from the tip of the gun to that point in the world (which is to say, the gun does not actually fire the bullet). For slow projectiles, like missiles and rifle grenades, you would aim the 'bulletspawner' object towards the target point (as determined by raycasting), and then spawn the rocket from the tip of the gun, but pointing towards the place you aimed for. Even better still, you can actually determine the point of impact by drawing a ray from where the gun is pointing in the character's hand, and then moving the crosshair if something gets in the way!
As for the 'all with one grenade' thing- you really don't need to do it with just one grenade. If your hand animated a swing back and forward, you can make the held grenade disappear at the exact moment when you spawn the thrown grenade- that way, it will still look right, and you don't need to do anything complex with the grenade physics.
Thankyou. 1) I'm not asking you to implement my game - I'm simply asking how everyone else implements there game. I Am 100% competent of scripting and know various of different languages - I am not "N00Bish Retard"
2) I hate it when people act like I'm a retard when I surely know I am not.
3)I didn't mean to offend anyone (As many have done to me >:/) I've tried what you have said before - the bullets come out of an angle from the Nozzle of the weapon and look fake. Everyone else's looks amazing...
4)I still don't get how you make the 'Externel' model, look like it's throwing a grenade at the same position as the player throwing the grenade?
I'm just going to have to keep watching Halo Reach till I find out how they do it (If it's good enough for bungie- it's good enough for me)
How are you making your bullets? Is it raytracing? Or are they actual projectiles? People won't help you if you get this defensive when people think your problems are simple.
Bungie does do the same. that's how, even when your weapon goes through a wall- you can still shot the wall because the raycast comes through the center of the screen ins$$anonymous$$d of the actual weapon.. (Obviously they use depth only rendering to render the weapon's ontop of everything else).
Thank's
my ammunition will be both raycast's and instantiated projectiles (it depends on the weapon.)
I apologise for my previous post. I was nackard and had a massive essay I had to write...$$anonymous$$an I wish I could do this as a career - somehow I doubt there's enough room for another wannabe.
Your answer
Follow this Question
Related Questions
FPS Camera+weapon setup? 0 Answers
Weapon Prefab 0 Answers
Avart Fate with Gun Movement 0 Answers
Problem With Weapon Firing Mechanism 1 Answer
C# Switch Weapon 2 Answers