Announcement

Collapse
No announcement yet.

Multiplayer Rotate Character To Camera Forward

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multiplayer Rotate Character To Camera Forward

    Hello, I'm using the default third person template and trying to make the character rotate to face where the camera is facing when I click a button.

    It is replicating on all clients, but on the local client who clicked he turns like 50% of the times. Most of the times he just doesn't rotate, but on the other clients he rotates correctly.

    Below is the blueprint code I'm using.

    Click image for larger version

Name:	Rotate Player To Camera Forward.PNG
Views:	401
Size:	166.0 KB
ID:	1394757

    Please tell me what am I doing wrong?

    Thanks in advance!

    #2
    Please someone help with this matter. This should be very simple to make, and I might be making a small mistake but can't notice it.

    I made very complex stuff in multiplayer but this made me give up...

    Comment


      #3
      bumping... still stuck

      Comment


        #4
        You dont have to use Multicast here, its very simple, When button pressed, u can set the actor rotation localy, after that, u can make a custom event that run on server, pass the rotation of your actor in a param, and set actor rotation again in Server. Because your actor normally is replicating, so u dont have to use multicast here.
        Attached Files

        Comment


          #5
          Hey Hiengs, thank you for your reply!

          I have tried your method and still the client turns 50% of the times. I'm running the game with a dedicated server with 2 clients. I try to rotate on client1, he sometimes rotates and sometimes he doesn't (50 -50), but client2 does see that client1 has rotated correctly to his destination, but client1 doesn't see himself rotated.

          This is very weird because both ur implementation and mine should do the trick, but it seems there is some kind of bug maybe?

          Comment

          Working...
          X