[Multiplayer] SetViewTargetWithBlend lags

I’m trying to make spectator pawn. But when i SetViewTargetWithBlend to other player, i have weird lags.

I found some topics but all of them without answer.

Video from other topic, i have exactly same issue : Video

So i have spectator, when mouse clicked i call RPC


Inside i get available TeamMate player (Character class)
Then i get PlayerController of possessed spectator pawn

And then…

That’s all, nothing special. Seems like everything should works fine, but i have those lags like in video above.

Why? Thanks for any help

Problem is camera is likely attached to the capsule, you really want the camera to be focusing on the Skeletal Mesh. (IE camera component attached to the skeletal mesh).

The way CMC works is, the capsule is always moved, and this is not smooth. The skeletal mesh is what actually is smoothed.

1 Like

It takes AActor* as parameter. How i can attach it to mesh component?

you need to put the camera component on the mesh in the character bp. And toggle it active/inactive (ie spectator camera component, default to inactive), when you are going to spectate, activate it and deactivate any other camera comp. Its a bit tricky, and we did ours via the PlayerCameraManager to avoid such issue.

1 Like

You right! Thank you very much, now everything works great :slight_smile: I didn’t understand how it actually works, now i can build my thing.