Third Person Shooter E14: Attaching our weapon

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay we plan it properly installed now again let's import the rifle so I'm going to import or drag the FBX into the view so five four four and there it is that's the blend I think I'm not sure so it has the two materials we created we can change the colors if we want but let's keep it like this now let's add the weapon to get our weapons to the assault rifle mesh let's reset the position now you can see the scale is really all my way up let's remove the cube first the the scale is way way off I'm not sure what happened but what went wrong but so if we look at the model the scale factor is one and here it's like scaled seven hundred times so if we scale this one one one it's really small but then we killed it scale this one seven one ten four that's even worse than we have so i somehow we or I messed up the the scale oh yeah this one hundred four so we didn't apply it maybe it was a problem with my like my blender so I'm gonna keep it like this but I usually prefer to get it to get to my scale here so it reads one a my assault rifle also one to have a good size from by 3d modeling software but it's not really a problem okay so let's first align it because it's looking the wrong way blue is the set X's which is forward and it's looking the wrong way rotates really weird too but yeah yeah look that's really weird see strange but we rotated 180 then we're very good yeah well good model is awful but ha I'm gonna put the this one in the download link as well in the description below with the download link and also for the auto rifle I did in the first video it's a little it's a little bit better it's not much but it's a little bit better all right with this like so the message zero now let's make sure it's where the hand is because we're gonna when the game start we're gonna find the hand and then put the hand at the weapon I set the parents of the weapon to the hand so it will follow its movement we could go here and find it but I prefer to use my weapons transform as a parent and then put him right here and when we had one weapon or maybe walk more weapons when we switch a weapon we move it to the hand parent the hand so it will follow the position but to do so we need to figure out the position of the of the weapon so let's position it some units where the scale of this one is it's way off so maybe it has to do with everything somehow I screwed it up I'm gonna keep it like this I don't feel like fixing it all right let's move this 90 degrees and then probably thus FX is also 90 degrees here now let's put it somewhere here in its hand here maybe here okay yeah but if I if I would run this it would go wrong terribly I will show you no because then it will stay right there and we wanted to go to his hand so what we're gonna do we're gonna right now we are signing the assault rifle as the weapon for the player shoot so let's open a player shoot and play shoot maybe play weapon movement sorry sure let's open up so platform now we're not going to do it here so let's move to the shared let's do the shooter yeah we're going to use the shooter so we don't have to do it for every weapon so let's first find the parents transform so let's say a public transform hand let's not make it public but just make it share lastly so let's field point form ahead we're gonna undo this muzzle doesn't need to be public so let's make it private and move it to the privates down here okay so this is my hand we're gonna probably change this later on when we are refactoring it so in when we are in the awake we gonna say let's see you let me let me just find a good position for what we want to place this knocking the prayer not a of course not here player shoot maybe we could do they shoot right here so also we can add more weapons later or whether it should be the better place well just let's stop wasting your time hand and do it here let's do it in place should so we're going to set the parent we have to be so far blessed shooter I'm sorry I'm not really sure what I'm doing right now let's let's call now take a good look what I'm trying to do I want to put the salt rifle in the hand of the player so we can sell it as a parent so this is the body spine spine right shoulder right arm like forearm right hand like so so this is set from the weapon and now we're just going to say this is this is not how we gonna do it eventually set transform set parent hand right so now it moves to be hand so if you can if you look at the right hand now the assault rifle has moved here and it's gone from the weapons what you see the rotation is still not the way we wanted let's check how it works we need to rotate it a little bit on the uneasy xcx's yeah maybe on the Y and the y axis and we're going to move a little bit lower so that's it this is about what we what we want maybe a little bit on that that X is back too so something like this so let's do it come back to them weapon okay so it's a little bit forward a little bit inward and a little bit longer how's this you still need a little bit more on the rotation for Saudi y-axes even more so this is just tweaking your your weapon weapons position even more okay this looks much better still we want it to be a little bit more in work on the jet exits or not let's check it one more time because it's it's a it's in his hand here in its arm and how is his hand in the front you have to work with these models position so this is see how it looks from the game you can see it looks pretty pretty good from here because you cannot really can really see it cool bullets okay well that works we're gonna keep it to keep it like this tweak it all the way you want but you get the idea see you next video bye bye
Info
Channel: Stevie ROF
Views: 31,937
Rating: undefined out of 5
Keywords: unity3d, weapon, third person shooter, tutorial
Id: Q1jM29vTFJE
Channel Id: undefined
Length: 12min 10sec (730 seconds)
Published: Sat Sep 10 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.