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!
asked Nov 30 '17 at 09:13 PM in Blueprint Scripting
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....
Also it does matter in which blueprint you placed this.
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.
answered Dec 01 '17 at 11:41 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here