How to - player1 spectate player0 on spawn?

I’m having trouble finding anywhere of how to get Player1 to spectate Player0’s view on spawn, is there a way do do this in Blueprints?

If there isn’t a way to do that, is there a way to replicate the inputs of Player0 to Player1 so I can make a pawn that follows Player0’s view?

Or replicate Player0’s WorldLocation and Rotation and updates Player1’s every Tick

Thank you.

Heya Nicolii,

The [Set View Target with Blend][1] node should get you what you need. If you can get a reference to the other player character and use a reference to your own player controller, you can easily set the view to the other player. A real simple test I ran for this with 2 players was as follows:

From within the Character BP, this finds the other player:

Then this toggles the view between characters:

Obviously this can be used in better ways, but this simple test should get you started in the right direction. Hope it helps!

Thanks Ben that’s pretty much what I was looking for.

Though I am having trouble with getting the rotation of the ThirdPersonTemplate Character_BP Camera. I seem to only be getting the movement input and not the look input.

I did do something different to get the location and camera rotation (picture attached, graph is the same up to your SET-OtherCharacter- as my SET-PlayerGM-), but am suspecting to be rather unnessesarily network heavy as it’s quite choppy, though I could limit the tick frequency and interpolate smoothly between each step.

Is using the Set View Target wtih Blend more bandwith friendly?

I’m making this to DM a D&D / other Pen & Paper games online, and it’s convienent for everyone to know exactly whats the basic environment is like. I want the DM be the camera for everyone so the players can’t fly off and know the environment ahead.

I’m not 100% sure, but it looks like with this setup you’re trying to move the actual player pawns to the location of the Player GM on tick? I’m not surprised this is laggy, since you’re doing quite a lot of communication between clients and server on tick, which is inadvisable. To answer your question specifically, I am guessing that the reason the rotation doesn’t match is because you’re changing the Control Rotation, but the pawn itself isn’t set to match the control rotation.

Using Set View Target with Blend is going to be much better for networking, as well as being much simpler to set up with fewer side effects.

Another possibility, though I haven’t tested, is to have each player character spawn a camera actor in the level and attach each of them to the Player GM. This way they should move where the GM is, but maintain individual rotation. Then you can have each player Set View Target to one of the cameras, and implement their own control over its rotation. Not sure how network efficient that would be, though I don’t expect it would be if set up correctly. Not sure if that’s what you’d want, either =P