I really rarely have the need to come here and ask for help but this time I’d like to have this over with and continue with my project.
Basically I’m having a static camera issue which doesn’t really show up when using one player because it rotates towards it, but it comes when having two players because it actually rotates towards a point between them.
The way i’m developing my character, both the movement and the aiming are based on a “Find look at rotation” between the camera and the character itself, but when booting up another player, this system no longer makes sense.
I’ll upload some images about this issue but I would REALLY appreciate if you watched a minute and a half video i made about this to explain it at the best of my abilities.
Have you watched the video? The camera points at the center of both two characters but if you give it a second of thought, using THAT rotation makes no sense, because as the players stray away from each other, “up” should start to be slightly different but there is no way to update that using only camera rotation since it is just rotated towards an indiferent point.
I can try to explain this more if it is not clear. Let me know.
You didn’t show the code that compute your up vector in your video (weird choice when you want to fix this issue ^^), anyway, you have to use the Forward vector of your camera to set your up vector (and right vector), (it doesn’t depend on your character location according to your request).
I will try this later and let you know, though all of that seems different than my approach. Whether or not I should use up vector instead of forward, I cannot decompose just now in my head.
Alright so I was really overwhelmed by too much work to even realise the posibility of Up Vector. That’s a good call!!
Still my character is aiming sideways properly but literally up and down when pushing the stick up and down, instead of “forth” and “back”. Which still makes it useless.
Will give it some tinkering later and update back. Any more tips about a top down or hacknslash camera would be really appreciated.
After some thought i feel like the up vector suggestion is intended for aiming Up and Down, but my character never aims up and down. Just around itself. Top down shooter.
Im pretty sure that this explanation is going to be confusing af but i’ll still try to make it somewhat “simple”
So you could place 2 boxes on your map, those boxes are going to act like “face cameras” that always follow your players and always stay on original camera’s right vector. Blueprint on this screenshot is not copy paste or anything (im tired and going to bed so just put something together fast) but it explains the steps and on 3rd screen you have picture that might somewhat explain what we’re doing here. On top of that i didnt mention in that screenshot that for it to work really good it would be kinda necessary to spawn another box that basically copies camera rotation and position except Y-rot and you have to place it on the same level as your characters. All that simply cause all that math there is done on a plain but the second you add height to it it’s going to be accurate especially when characters get really close to the camera. You could fix it like i said with spawning another box that copies camera just stays at character level and then use that box instead of original camera for grabbing distance and stuff. Well if you think this is something that you could use and have questions or help with something just ask, i’ll be here again in few hours
edit: no it is not tested but the math doesn’t lie!