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"

Physics Handle Doesn't replicate

Than i drag objects by Physic handle it moves only on one client. How i can fix it

Product Version: UE 4.17
Tags:
more ▼

asked Nov 01 '17 at 09:59 AM in Blueprint Scripting

avatar image

chernoburk
31 3 8 14

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

1 answer: sort voted first

Make a multicast function with the needed code. Then, call the multicast function from a not replicated function. Finally, call the not replicated function from a Server RPC function (Run on Server).

The replicated functions have to be reliable. After making all those functions, make another one that is the final function that you will call from the input, check for authority (Switch has Authority), and for authority add the not replicated function, for the Remote add the Run on Server function. These functions are actually custom events in Blueprints.

Example C++ Code:

 void MulticastGrab()
 {
      // Do code here.
 }
 
 void NotReplicatedGrab()
 {
      MulticastGrab();
 }
 
 void ServerGrab()
 {
      NotReplicatedGrab();
 }
 
 void Grab()
 {
      if (HasAuthority())
      {
           NotReplicatedGrab();
      }
      else
      {
           ServerGrab();
      }
 }
 
more ▼

answered Nov 15 '17 at 08:58 PM

avatar image

Midsoft Games
56 1 3 11

(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