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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Using control rotation on multiplayer

This is my first attempt at multiplayer and I am making a tank game. I am using the control rotation to rotate the top of the tank and barrel. It is working fine on the server side but on the client side the top of the tank is locked in one direction while the camera is still able to move freely. I have used print string to be sue the values running into the run on server node are changing with the control rotation but still no luck. The tick node that is running this is in the player controller while the rest is inside of the tank BP. The classes themselves are replicated. I am sure I am missing something simple. Thank you in advance!

alt text

alt text

alt text

Product Version: UE 4.17
more ▼

asked Nov 30 '17 at 09:13 PM in Blueprint Scripting

avatar image

25 1 3 4

avatar image hq231 Nov 30 '17 at 09:15 PM

Also tank is made from sedan template which is why the cast to sedan is there.

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

2 answers: sort voted first

In your bottom image you are calling 'HandleRotation'. You dont need to do that because it is being called by the server in the middle image. In bottom image you only need the "RunOnServer" call. The program flow should be....

  1. Client tells server to make move

  2. Event on server calls multicast event on all clients and tells them to make move

  3. Multicast event on each client makes the move

Also it does matter in which blueprint you placed this.

more ▼

answered Dec 01 '17 at 08:46 AM

avatar image

46 1 5

avatar image hq231 Dec 01 '17 at 01:48 PM

Thank you for you help but unfortunately this doesn't change the outcome. I have noticed that if I put a delay on the tick event it is actually working but snapping back so it never appeared to be moving. If I remove the authority output on the switch has authority node the clients work fine but the host can no longer move. It appears the the client is calling authority or the server is screwing with the clients. I tried removing the switch all together but it just locks the turret again. The control rotation is locking at 180 degrees on the Z axis for some reason.

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

Dude, why would you have all this painwork when you could just replicate the character actors and let the UE4 does all the trick?

In this quick tutorial you can see how to archive that: https://www.youtube.com/watch?v=OcBMXIHUMLQ

By the way, if you want to this in the way you are doing (what I really don't recommend), you will need to pass a reference of the controller or the character being moved to the Handle Rotation event.

more ▼

answered Dec 01 '17 at 11:41 AM

avatar image

310 3 7 10

(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