x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Problem in SetViewTargetWithBlend in Multiplayer

i'm trying to make a sky camera for all players then when the match starts each playerController switch to his own pawn's camera with blend (SetViewTargetWithBlend) and possess his own pawn

1st: I have set a reference to the player pawn in the playercontroller, this reference is set by game mode (by server) and is replicated too, the player is now possessing the sky camera alt text

2nd: when the match starts the gamemode calls each player controller in the lobby to start the event of switching view from the sky camera to the pawn camera

alt text

3rd: The event which does the switch view is on each player controller and it's (Run on owning Client) and it does the following as the BP shows, also possess in the player pawn

alt text

However, only the host server does the switch camera view and the client doesn't, and an error message is shown (Pawn not valid), tho it's replicated and set by the gamemode(server)

alt text

can some1 pls help me with that i can't find where's the problem cuz every thing seems ok

Product Version: UE 4.19
Tags:
more ▼

asked Oct 14 '18 at 12:57 PM in Blueprint Scripting

avatar image

Symatix
6 3 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Ok i found the Solution, it's something related to ownership of the pawn.. it's currently spawned by gamemode so it's owned by the server, thus my connection to it is dropped when using client RPC

the solution is determine the owner of the pawn when the game mode is spawning it in first place by (plugging the owner node -in the spawn actor from class- to the player controller reference so u can have access to it now

Or When u spawn an Actor by the server, u can Set Owner node to this actor to be it's player controller

more ▼

answered Oct 14 '18 at 10:02 PM

avatar image

Symatix
6 3 4

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question