Hello everyone. I’m creating a FPS and have run into some issue.
I was originally following a tutorial that had me start with the Third Person Project then move the camera into the character, socket it to the head bone then move it forward a little to avoid clipping into the head.
This works fine however, i now have my character holding a rifle and when “hip” firing i can’t see the gun at all, most big name FPS games you can see the gun while firing from the hip as if the camera is in the characters left nipple.
I attempted to move the camera down and to the left a little to get that view but now the camera is clipping into my characters arm and when i jump it clips inside his legs.
I thought about using the First Person Template, but it looks like its just a pair of floating arms, I want this to be multiplayer though and I dont want a bunch of sets of arms just floating around shooting each other. What would your recommendations be?
if its multiplayer you could work with the replication and the settings associated so that the controlling player sees the first person view but the other players see the third person. also note most “hip fire” in fps games isnt really from the hip its still at the shoulder just not looking down the sights.
that’s two different things. What matters is if you want your player to be able to see more than hands. such as legs or even being able to quit first person view to enter third person view through a zoom thing.
Reading this after 3 years really makes me chuckle because nothing you contributed to this post was beneficial as it had nothing to do with what OP was talking about. He’s talking about best practices for Third person template vs First Person Template and you failed to understand what he was talking about. I stumbled up this as I have the same question, that clearly never got answered.
If you’d like I can try to help you out with this, I’m working on a true first person shooter and can try my best to guide you through what I did. It’s definitely not the best, but will at least get you headed in the right direction.
First of all understand the difference between first person perspective and third person perspectives.
1: They are just switching two cameras one is attached to the head of the character and the second is place far away from the character and attached to the spring arm or use one camera and switch attachment between sockets on your character for fpp camera and tpp camera and in case if you want to shoot weapon you are still in third person mode no matter which camera you use out of them.
2: If you want a real system where you will have both first/third person modes not just the camera switching, consider having two character classes BP_FirstPerson and BP_ThirdPerson.
Both classes uses their own unique set of animations, and now you can make some switching system so when you want to switch to the first person mode, construct a copy of it based on your third person class having all those properties like health, weapon, inventory items etc… and spawn it, start posessing it and destroy your old third person character.
for optimization consider catching the classes.
hope it helps, cheers!
The First Person Character has a secondary skeletal mesh slot. You’re supposed to add the third person character mesh here. This will give you a Goro type character.
Ofcourse this will work but it not ideal and will have few issues, I have few projects with this system made just to find issues it will have.
The main issue is Optimization specially if your third person mesh is modular like in PUBG
1: If you have multiple iron scopes like 2x, 3x etc… and each have its own reticle transforms and you need to adjust the first person arm based on the reticle to target it on the center point of the camera to shoot the projectile correctly, and what we found is after doing this adjustment the first person mesh has not the same transforms as the third person mesh since the first person mesh is moved to set the reticle of the scope target the camera center point, Sight with reticle is attached to the weapon and weapon is attached to the first person arms.
2: When you switch to the first person mode the weapon mesh should be attached to the first person arms locally, congrats we introduced a bug where the server is aiming using the third person mesh and we localy aiming using our first person arms, so when we look up/right the third person mesh is not synced with your first person camera.
Better to derive two seperate classes first/third derived from the same base character. This way you have neat solid system and much more optimized since you don’t have multiple animclasses, meshes, cams in a single character class.
Games like PUBG also using seperate classes and it also give you an opportunity to select a game mode like just play in first person or third person before starting a match.
Another option is to make a camera on the weapon for aiming iron sight and switch to it, and drive the camera on already adjusted reticle sockets based on the supported iron sight attachments
9K hours in PuBG. They are using the Goro setup. Confirmed in 2018 do to an animation issue (ABP) where the third person animation wasn’t using the same animation the fpp mesh was. Specifically when running with the Thompson in FPP mode. The TPP animation was one handed w/barrel up. In fpp mode you could see the tpp meshes shadow.
When toggling perspectives FPP → TPP (vice versa) you RPC the server so it can update what camera it uses. Also when doing traces for aiming (specifically hip) you use base Aim Rotation and the camera manager -> camera location.
PuBG’s optics are attached to the weapon. The reticle is a material instance w/parameters.
PuBG uses 2 weapon meshes when it’s equipped. One for each perspective mesh. On the non-used perspective the mesh is hidden and shadows aren’t rendered (bcastshadow false). Issue seen with the Thomspon was that bHiddenShadow was ticked.
The entire issue could’ve been easily solved and optimized by simply toggling the gun mesh back and forth on the autonomous proxy as needed. Also character sim proxies only need the tpp mesh. On equips for sims could managed via flow control… get local role == simulated proxy.
PuBG uses the same character class for ALL of its game modes. In TPP modes you can hit the V key to toggle to FPP mode. Same in the Training Mode. By default it uses TPP.