Greetings everyone!
I’m making a FPS project and want to setup ADS and Scopes. I tried different approaches, but so far this is the only one that truly seems to work. My setup is as follows:
- A Character with a bunch of different inputs and a camera component.
- Parent class for weapons with all functionality and its own camera component; actual weapons are child classes.
- All cameras are attached to sockets on the respective meshes.
- Weapons picked up by the player are attached to the player’s mesh as child actor components (again, via a socket).
- Both Yaw and Pitch (Y and Z) come from the pawn’s base aim rotation.
My issue is that when I switch from the player’s camera to the weapon’s camera (using the SET View Target with Blend with the node’s target being the Player Controller), the player is forced to look almost straight down and Pitch input doesn’t work at all - Yaw input still works normally. Why does that happen and how do I fix it? Here’s a video of what happens, as well as the workaround fix, mentioned below.
EDIT: I have been able to come up with a workaround fix. However, I am not sure if this is the correct way to do this.