Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Unity Multiplayer How to update ragdol in Photon Unity Networking

Discussion in 'Connected Games' started by tafeczek, Dec 7, 2018.

  1. tafeczek

    tafeczek

    Joined:
    Sep 23, 2017
    Posts:
    7
    Hello, everyone i have problem with sync character


    Code (CSharp):
    1.         foreach(Rigidbody element in rigiBodyArray)
    2.         {
    3.             element.isKinematic = false;
    4.         }
    5.  
    6.         myPlayer.GetComponent<CharacterController>().enabled = false;
    7.         myPlayer.GetComponent<FPSInputController>().enabled = false;
    8.         myPlayer.GetComponent<MouseLook>().enabled = false;
    9.         myPlayer.GetComponent<Character3rd>().enabled = false;
    10.         myPlayer.GetComponent<CameraMenuMove>().enabled = false;
    11.         myPlayer.GetComponent<CharacterMotor>().enabled = false;
    12.         myPlayer.GetComponent<Animator>().enabled = false;
    How can i update player information and send to other player i don't idea to create RPC

    Thank you for answer
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    23,847
    A quick note/sanity check (not solution) As ragdolls typically do not affect gameplay I suggest not synching them at all and just keeping each ragdoll a locally simulated body.

    This is the general case for all non-gameplay impacting features across the network in most games, example would be particle systems (they're spawned across the network but only exist on the client with no further synching).
     
    tobiass likes this.
  3. tafeczek

    tafeczek

    Joined:
    Sep 23, 2017
    Posts:
    7
    if I do not sync do it, the player will be standing all the time
     
  4. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,068
    You need to disable the code, that reads the incoming updates for a networked object, when you want the ragdoll system to take over. It should be similar to how you do it in singleplayer: Once a character is animated as ragdoll, you'd turn off the controller, right?