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 Character Rotation in Top-Down MP

I've been wrestling with this for a couple of days now and don't understand what's going wrong with replicating my characters rotations in MP.

The first image attached shows how I'm controlling rotation of the player. I want the character to rotate to the direction that the right thumbstick is pointed, and rotate at a speed that I can define, so I'm rotating the character mesh instead of the pawn itself (which, as far as I can tell, will only rotate instantly and not work with any of the interpolation-over-time functions).

alt text

The second image shows how I've modified the Blueprint to try to get rotation to replicate in a multiplayer game.

alt text

With this Blueprint, on a listen server:

  • Each character can see themselves rotate.

  • The server can see the client rotate.

  • The client can NOT see the server rotate.

On a dedicated server:

  • Each character can see themselves rotate.

  • Neither client can see the other rotate.

It seems like the information is not being replicated to the clients from the server, but I don't understand why the "ReplicationRotation" event isn't casting it to all the clients.

Any help here would be very appreciated! I've read a couple of other threads about similar problems, but it seems like all of them end up using pawn rotation, which I can't use because of the lack of rotation-interpolation-over-time.

Product Version: UE 4.9
Tags:
rotation01.png (231.9 kB)
rotation02.png (370.4 kB)
more ▼

asked Oct 29 '15 at 08:37 PM in Blueprint Scripting

avatar image

MonsterDrew
16 4 6 11

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

2 answers: sort voted first

Have you tried passing the actor reference into the function to run on the server?

It may be as simple as the server not knowing what actor you want to rotate. Also, i thought that simply by enabling replication on the actor its position/rotation and any exposed variables replicated.

more ▼

answered Oct 29 '15 at 08:59 PM

avatar image

MrGrr
991 34 3 41

avatar image MonsterDrew Oct 29 '15 at 09:51 PM

Thanks for the quick response. I'm still fairly new to BPs - can you be more explicit about how I would pass the actor reference? I've looked at the Set and Get Actor References and Referencing Actors in Blueprints pages but am still unclear how exactly I would do that here. Can you point me in a direction?

From what I've read, enabling replication on rotation isn't always as simple as pure movement. Since I'm rotating just the mesh (because I can't rotate the actor via interpolation, only "Rotate Actor" which forces instantaneous rotation), that isn't automatically replicated.

https://answers.unrealengine.com/questions/175829/blueprint-replicate-rotation-to-server.html https://answers.unrealengine.com/questions/204517/top-down-character-rotation-replication.html

avatar image MrGrr Oct 30 '15 at 12:45 AM

When you edit your function that runs on the server, you should be able to setup an "input" of a certain type, once you do, you can drag the actor reference into that. on the server execution node, drag the reference out into the rotation (instead of using self, which the server/clients won't know unless we tell them which actor to rotate)

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

Hello @MonsterDrew, have you find solution for this?

more ▼

answered Apr 09 '16 at 12:39 PM

avatar image

iRYO400
35 5 5 9

(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