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"

SetOwner + EnableInput = lost connection ?

Hi Guys,

I am trying to control an AActor with any player controller.

The AActor is spawned on the server.

When spawned with SpawnParams.Owner = this, then only the client that requested the spawn can take controle of it: EnableInput(PC) works only with the original PC, not with other clients PC.

When spawned with no Owner parameter (Owner = NULL) then the input will be enabled for no one.

When i try to manually define the Owner with SetOwner(PC), the ownership seems to be granted correctly (i checked with debug messages) but then the connection is lost as soon as i call EnableInput.

I tried to call SetOwner and EnableInput both on client and server (all 4 combinations), i tried to replicate the PC.

I just can't take control of the AActor if it has been spawned with no Owner.

Can someone tell me how to do that ?



Product Version: Not Selected
more ▼

asked Dec 20 '14 at 11:20 PM in C++ Programming

avatar image

875 76 93 366

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Apparently SetOwner has to be called on the server (which makes sense) and EnableInput on the client (which also makes sense.

But it takes some time to SetOwner to replicate the owner, maybe that was my problem.

I solved it by calling SetOwner both on server and client.

more ▼

answered Jan 11 '15 at 10:27 PM

avatar image

875 76 93 366

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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