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"

Replicating moving physics handles

Hey everyone,

I am pretty new to the editor but have been having a lot of fun, but I ran into a problem when I tried to use the Physics content example to move things around a scene in game. I can move things but they are not replicating to the others, be it a server or client. I would like to be able to move stuff around in my scene from a client and have it replicate on other clients while running everything on a dedicated server, is this possible and if so your help would be greatly appreciated!

Product Version: Not Selected
Tags:
more ▼

asked Nov 24 '14 at 09:05 PM in Blueprint Scripting

avatar image

Washington College GIS
11 2 1

avatar image ngong0 Dec 03 '14 at 02:43 AM

I would like this answer as well

avatar image Washington College GIS Jan 28 '15 at 07:50 PM

So I started on this project again and I now have a different problem, the server can see both the client and its own moving of the physics object. The client however cannot see anything be it the server or the client itself moving the object.

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

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 09:01 PM

avatar image

Midsoft Games
56 1 3 11

(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