Im going to try to explain this problem in as much detail as i can, I hope i explain correctly. I want to start by saying I have looked and looked and watched video after video but i can not find this covered well.
I am trying to set up a third to first person character but i am running into problems.
The main Problem I am having is that the character uses animations… namely “Animset Pro”
The idle animation contains a “Wobble” where the gun moves about, this means that while the character is aiming, the gun is all over the place but the aim is not, this looks stupid
If i tie the aim to the weapon not the screen center then i will have a aim that cant be controlled.
At the same time i am trying to make a first person view with iron sight which is pointless using this animation for reasons above.
I am after a Dayz type character and have take some screens from Dayz and my game so you can see a comparison. SEE HERE
I have tried as you can see and can get something close but just not good enough
this has ground me to a halt
I am not looking for someone to “Do it for me” (tho wont complain at this stage as long as i can learn something) I really want to learn and have some exciting ideas for this mock game but im loosing heart with this and am asking
if someone has the time will they please help me go through this.
A few things to note is that the base of the game would be a multiplayer so important that “What others see” is considered
I need the character to have a first and third person view with iron sight
I am using the default character in 4.10 with Rifle / Movement and Pistol aimset pro from market place
I dont have a great deal of experience so go easy on me!
Can anyone help this tired and frustrated chap move forward please
You could possibly have a static local offset from the actor location for projectile origins. e.g. have a default origin transform toggled for hip fire and ADS, which can be overridden by specific weapons. This would tie the origin to the movement of your char capsule as opposed to the animations while still allowing for variable location.
I’m not sure, the system I’m thinking of would just replace the location of the socket transform with a manually-set transform. That should result in the same thing sans dealing with animations.
e: if you mean the visual not matching the anim sway, yes there could be an issue. You would still play your muzzle flash from the socket location, which would obfuscate that, but you could also fade out the tracer until a certain distance from the character.
I would suggest making your linetrace/projectile spawn from the muzzle of your gun, its as easy as attaching to socket. As for the animations, one way you could do it is to just make a new animation that centers the gun and its ironsights to the origin of the camera, but not have any keyframes in the animation so it doesnt move.
You’ll have to excuse the debug wires, but on the weapon you’ll get the owning player’s controller and use it to rotate a vector offset you define per weapon, then add the location of the actor. It will need refinement, the dubug arrow and sphere are useful to see the inaccuracies.
e:
I had some time for more testing, this is now implemented into my own project.
Search the forums for ‘true first person’.
There are several posts that talk about iron sights/ADS, including one that should contain a link to some Blueprint math I did ages ago
morganmc, I came into a similar, if not the exact same issue over the weekend when I was trying to add a First Person mode to my currently Third Person game.
The idle animation loop for the Rifle Animset Pro contains a wobble, which is OK in Third Person but not in First Person. I do have an “Aim” event for Third Person which zoom in to an over the shoulder view similar to what you have done. I want the wobble to stop when zoomed, similar to how you want the wobble to stop when in First Person.
Right now, the only way I think this can be solved is to edit the idle animation loop and remove the frames that do the wobble. Heck, you can just have the first frame if you don’t want any movement during idle at all, although the character will look frozen. Luckily this can be done in Unreal itself. Just make a copy of the Idle animation loop, open it in the editor, and then edit it by right-clicking on the time bar and remove frames. Then you will need to replace the original loop in your blendspace with your new loop.
This is all off the top of my head, so if it doesn’t work the first time, I’ll edit this post when I get home.
Thats what i was thinking, taking the Aim Offset frames and using them for first person.
I would be eternally grateful if you would share your result with me should you nail this problem. I have spent days on cameras etc and have actually gotten a bit lost at this stage
Always open to chat if you can/want have a ts server set up
I really want to make some progress but hit such a rock
Yeah, if you really want to get into implementing first person, Shooter Game uses a dual mesh setup, one for first person and one for third person. The player only sees his first person mesh and not his third person mesh, while everyone else sees the third person mesh. Someone then made a wiki here that adds a toggle for the player to switch to third person. Although it is in C++ so I don’t know if your project is or not. I tried to do this in blueprints over the weekend but got stuck with my weapon not spawning correctly (either not at all in both views, or on all the time in both views). Using this method, you would also need to obtain the first person mesh, which is usually just arms (that’s what they use in shooter game). You would also need a separate animation blueprint specifically for the first person mesh as well.
This might be a lot of changes to make in your game to make it have a “true first person” mode. I may do it in the future, but for now I’ll stick with just adding a faux FPS camera and work from there. I’ll let you know how the editing of the animation loop goes later tonight.
That will take care of blending the camera to a point that aims down your weapon.
To smooth out the movement, you will need to either a slow down of the aiming animation or blend it with a static frame.
Blending would allow more control and probably give a better result.
Thanks to all for your help… I shall give it a go tomorrow. I have some great ideas for game logic… I am a web programmer by trade. Was getting frustrated because as far as i am concerned i need my char nailed along with some networking… from there i can just expand on the logic.
I am the first to admit, my mentality will not allow me to make anything I dont like myself… I have lost many jobs from this!
I will be trying to make my end game from the beginning but thats not always a bad thing.
Alright, so I did pretty much what I said in my first post, which was make a copy of the Idle loop animation and remove all of the frames other than frame 0.
This made it so while standing still, he is completely still, no wobble. Now you can position the FPS camera directly behind the iron sights and have a good aim.
Let me know how it works out for you.
EDIT:
Also I was thinking about this for my own game. With the Rifle/Pistol anim packs, the character is pretty much always appearing to aim down sights. So if you wanted to make it where you have both first person “idle” and first person “ADS”, it would have to be done with camera “tricks”, or just moving the camera’s location and rotation over a very short period of time to make it appear like the character is bringing up his gun, when in reality he is not. And to make sure there is a gameplay difference between idle and aim, the maximum spread of the shots can be reduced (significantly if you wanted to make a true difference). This camera trick might not be ideal, but the solution would be to have the separate first person mesh that has an ADS animation and not have the camera move.