
Pitch Replication And Axis Compression In Unreal Engine
Replicating Pitch for using in aim offsets is a quite a common task to come across while building almost any kind of multiplayer game, you want to replicate the look view of other players to know where they are looking or aiming at. Quite a lot of young developers will search about this on internet and come across tutorials that manually replicate the pitch value from control rotation, this is all well and good and I myself was one of those guys back in university days starting to learn Unreal I also replicated the pitch using the same way, it was not until I came across Shooter Game where upon seeing the source code I realized that a better and more efficient solution already comes with Unreal Engine. The Pawn Class You can use the function called GetBaseAimRotation() which exists inside the pawn class to get the replicated pitch in blueprints as well. Follow these steps: Get Base Aim Rotation and Get its forward vector. Inverse transform the direction from world to local space using
Continue reading on Dev.to
Opens in a new tab


