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"

Multiplayer - server not updating pitch rotation value

Hello,

I found and reproduced very strange bug: I created actor with scene capture 2d component. Then i created child actor component in character BP. In character BP, in runtime im setting child actors class (with spacebar key) to class with scene capture component. As you can see in video, server's child actor attached on spring arm not rotating in pitch, but clients rotating properly... I tried to attach child actor to camera, but with same results.

VIDEO: https://www.youtube.com/watch?v=cRknhsJTh-A

PROJECT: https://www.dropbox.com/s/vtfmtwu3pehctcd/UE4.zip?dl=0

Product Version: UE 4.11
Tags:
more ▼

asked May 26 '16 at 04:50 PM in Bug Reports

avatar image

Name368
118 7 15 20

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

1 answer: sort voted first

I found 2 issues in your BP. first, the issue about pitch was easily fixed by just moving the static mesh to be a child of the camera, but if you want more flexibility, i added extra logic you can actually use if you intent to replicate the pitch/yaw animation on other clients. (pitchyawreplication.jpg). i also set every single setting into the details section to the defaults, seems like you were clicking a lot of stuff on and off (causing weird movement on the character too). second was the material generation. the first one that set the class to the child actor was the only one rendering the image. im not too experienced on this but i think cause you are sharing one same material across the game. for this, i created a material instance, a render target 2d and set the render target to the new created. then made everything you usually do manually but inside the blueprint. this way each one has different targets and are independent. i also did this client side and server side independent, to avoid the lag on client side (and dont depend on recieving network updates for the rendering) everything is explained on the screenshots. hope its useful.

alt textalt textalt text

more ▼

answered May 26 '16 at 09:55 PM

avatar image

jblaswu
813 22 11 46

avatar image jblaswu May 26 '16 at 10:05 PM

Also, i used this respawn setup for controlling the asignation of the pawns and set the default pawn class to none. note that the player1 and player2 are arrays of class Player Start, and each player start on the map needs to have their tags (Player1 and Player2)

alt text

gm.jpg (746.3 kB)
avatar image Name368 May 27 '16 at 03:56 PM

Hello, thank you for reply! But unfortunately, that child actor component still not rotating as it should... Static mesh component is ok, but field of view of child actor class - render target is not updating pitch... in this video its better to see what i mean:

https://www.youtube.com/watch?v=oEFH2IvLubY

that sniper texture is set to "only owner see" so it is not necessary to replicate pitch and yaw, i not tested that replication with pitch but i think it cant help..

I uploaded my main project, if you could check it once more again i will be very thankful :)

and now material, i have some way how to set material to each connected player, but i totally dont know why its not working, i have that placed in "Hero Base" blueprint, it uses node "get all actors of class" and then set to character unused class and texture... material dont need to be changed because it worked for me, but i cant find way how to avoid overriding classes and textures... if you could help me with this ... :) i spent with this sniper texture 30 hours atm and it still not working...

avatar image jblaswu May 27 '16 at 04:11 PM

did you try my blueprint? its step by step and it works also, see the hierachy on my PlayerCharacter and make sure your static mesh is inside the camera.

you will still need to replicate pitch and yaw, else your clients are gonna aim up or down and the other players wont ever know about it. youll need those values for AimOffset animations. just note that i set 2 "SetRelativeRotation" for FollowCamera by mistake, the last one is not needed.

avatar image Name368 May 28 '16 at 01:55 PM

Hello, I did it like you, but still without success (im only not sure if i did correctly function set yaw pitch because it is not in your screenshots)... Here is my screenshot: http://i.imgur.com/xXGRLVN.jpg

I cant undestand why that render texture rotating in yaw but not in pitch...

for sure here are my character BP + render classes (500 kb file): https://www.dropbox.com/s/s6oe1uwnn8j6c81/sniper.zip?dl=0

avatar image jblaswu May 28 '16 at 05:34 PM

hi, i got your BP but cant test anything because you have not included files like your game instance for example, and i get bazillions of errors trying to run it. this is my BP, tell me if it works

https://drive.google.com/open?id=0BxVkFZ_FgTxQb0p6S3VYM05pbzQ

avatar image jblaswu May 28 '16 at 06:30 PM

oh and i finally was able to make it run. so the 2 mistakes are:

  • look closely at my BPs, you missed the part where i created a new texture render target2d inside the blueprint. that is important, else, they all will use the same target and overlap their own sniping sights.

  • at your RM1 (i guess thats the material you are using right?) you duplicate the texture, but on blueprint, you are only changing the parameter of 1 which makes no sense at all. in my example i did that because i didnt have 2 parameters in the material, if you want to use that setup you have to change both (tho i dont know why you are using that material setup, just multiply/divide * 2 the texture if you want something like that)

avatar image Name368 May 28 '16 at 08:55 PM

Hello, That works finally! Thank you very much for help and patience :) . Im gonna check it deeper and that clear character movement is pretty nice too :)

So this topis is SOLVED.

(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