How to start spectating from clients?
Hello, I have a blueprint-basded PlayerState, and I would like to set a player as spectator. The only way I found to achieve this would be to set bIsSpectator to true. The problem is that bIsSpectator is a blueprint read only variable, so my question is, is there a way to set that variable via blueprints? If not, is there a way to set a player as spectator without that variable? Thank you
k, that was more painful than expected
First I tried to make a nice non intrusive utility function which just calls the correct functions on the playercontroller and be done with it, but ofc nothing is ever easy....
I ran full frontal into that problem Spectator Pawn On Client Side, so long story short. As far as I can see there is no way to use spectating "correctly" without creating your own PlayerController class. To use my solution you will need to inherit your PlayerController from the class I added below, or you can also just add the code to your implementation of a PlayerController if you already have one. An example how to use it would be in my github test project here in the StartSpectating folder.
and an example how to use it
more elaborate example with switching to spectator mode and going back
answered Jun 13 '19 at 08:55 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here