Rotate Camera Blueprint with players
I'm making a 1vs1 fighting game with a shared camera. I want to rotate the camera so the viewangle stays on the same side of the players when they rotate around, similar to this game: https://www.youtube.com/watch?v=G7WZf6Q_QR4 (gameplay starts at ~3:37). I've tried getting the players rotation and setting the camera actors rotation, but it doesn't seem to rotate correctly. Any suggestions would be greatly appreciated! have a awesome weekend!
(comments are locked)

you need to get middle location between players, then make CameraLocation  MiddleLocation, normalize result and this will be direction vector. Now you can use one of MakeRot functions. For example MakeRotFromX and rotate camera with this rotator. Thank you for the answer! I'll give it a try and report back. My vector math is abit rusty. Hey does this same method apply if my camera is an component of an actor? I'm getting some really weird results, maybe i'm not calculating the math correctly. Ok, so i've managed to get the camera rotating correctly. The only issues is now that when my players surpass a certain rotation, the camera flips to the other side of the players and the players movement is affected by it, as i am using the cameras direction for the players controls. Any idea what could be wrong? I'm getting each actors rotation, summing them together and dividing that by 2(Similarly to how the center point is calculated in the first picture). The division is clearly causing the camera to flip, but also makes the camera actor rotate correctly otherwise. I've tried normalizing the value but it doesn't seem to help. Samuelb the Rotation has been solved in this thread https://answers.unrealengine.com/questions/729365/cameraflippingonrotationissue.html
(comments are locked)

Follow this question
Once you sign in you will be able to subscribe for any updates here