[Multiplayer BP] Viewport/Mouse Position Per Player Controller?

When you have a chance, I would love to see how you would accomplish this in blueprints.

For now, I found a workaround solution after lots of testing

257174-hardfought.png

The main thing I’m doing differently now is that I’m using Set Control Rotation which seems to replicate over the network no problem. This destroys the camera system I had, so I had to find a workaround for that too.

I’m getting and setting the variables I need in the Player Controller BP:

Then in the Player Character BP I’m getting the variables I need (None of them are replicated) and setting the Control Rotation and the Camera Location using World Location instead of Relative.

There are some new issues with this method of using World Location instead of Relative Location.

I found that the ConvertMouseLocationToWorldSpace node did not give the coordinates I needed. It only had a gradient from about 20 to -20 units when moving my mouse from one side of the screen to the other. Whereas if I moved my character the same distance, it was actually closer to 200 to -200 units. That meant that the averaged offset of the camera was only about 10 units which was basically not noticeable at all.

So instead I used Hit Result Under Cursor by Channel, but if your mouse ever goes off a cliff or to the top of a building it’ll cause some jitter. I tried to counter that by using camera lag and will soon incorporate RInterp To like in my original BP. Additionally, adding an invisible box between the player and the camera that the Hit Result Under Cursor by Channel will collide with will fix any jumping issues as long as there isn’t a building or wall higher than the invisible box.

Again, I would love to see how you would tackle this, but I will mark this as solved.

Thank you again,

-Metric

[Result][4]