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"

Top Down Rotation Replication Problem

Actor Rotation Replication Problem

I am attempting to basically let other clients know when my character is rotating. I can not seem to get it working properly. At the moment, I can get it show the rotation to everyone else but the current client. I have attempted multicast and varying ways to get this working, but nothing seems to be working. I have even replicated the current actor and sending that variable but that did not help.

Replication Variable http://i.imgur.com/NVQliEU.png

ActorRef Variable http://i.imgur.com/8ImgyDU.png

TopDownCharacter Blueprint Construction Script http://i.imgur.com/IviKJdc.png

TopDownCharacter Blueprint Event Graph http://i.imgur.com/W0kzZqU.png

The Middle client is the one I am moving. http://i.imgur.com/li7dEaw.png http://i.imgur.com/ngD8T51.png

It does not want to change the current client positioning for some reason.

When I try to "multicast" SetActorRot, rotation no longer works at all.

Executes on server for both SetActorRot and SetRotVar custom events only work somewhat properly.

So the underlying question right now is....how do I get it to rotation to work via client and server properly?

Thank you for your help.

Product Version: UE 4.10
Tags:
more ▼

asked Nov 19 '15 at 07:31 PM in Blueprint Scripting

avatar image

MRouzbanian
3 1 3

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

1 answer: sort voted first

I had the same problem when working on my game but I found a solution.

What you need to make a custom event running on owning client and setting a transform or rotation you want. Then you need two more custom events one on Multicast and one on Run On Server as seen in the image below. If this is a player character you do not want any variables replicated or the server will just try and sync the rotations.

http://i.imgur.com/86h2EwC.png

Over In the Animation Blueprint you need to make a update animation event and have the rot you set in the character blueprint Rot Instance and have that variable replicate to server through a run on server custom event and set a new rotation variable different then the one that was set through the player blueprint as seen in the image below.

http://i.imgur.com/Xk1qjTY.png

Then create a state machine.

http://i.imgur.com/4rJLYAz.png

Then in there and create a Animation State.

http://i.imgur.com/9OE5mGx.png

Then in the Animation State take the new Rotation and hook it up to a Modify bone node. Select the bone you would like to modify and uncheck the pins you don't want to use. If doing a rotation like I did set Rotation Mode to Replace Existing and Rotation Space to World Space. Get a Idle Animation of your player and hook it up to the left side of the modify bone and then run the modify bone into the Final Animation pose as seen below.

http://i.imgur.com/rBnRPJe.png

more ▼

answered Nov 19 '15 at 08:25 PM

avatar image

Sir_Enhance_Alot
0 7 3 5

avatar image MRouzbanian Nov 19 '15 at 10:12 PM

I got it working using another method actually, but Sir_Enhance_Alot, your comment helped me realize something very critical. Something about blueprint flow.

For anyone who wants "my solution" for this, which is pretty "effective", here it is.

Top Down Character Blueprint
http://i.imgur.com/4MkZ74S.png

I did replicate the "Rotation" as well.

Also, the get mouse rot function grabs the direction the player is facing at with their mouse. http://i.imgur.com/830kkdv.png

Proof
http://i.imgur.com/ZIR08qQ.png
http://i.imgur.com/n0mecGY.png
http://i.imgur.com/4pkfDou.png

Thanks for helping me.

avatar image kpr_sajuuk Aug 26 '16 at 04:31 PM

It works!Thank you very much!

(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