Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by AlienNova · Oct 23, 2017 at 11:06 PM · networkingtransformnetwork

Child transform of player object not syncing with server

I have a player object with the hierarchy shown here alt text Player has the NetworkTransform and NetworkIdentity component attached, also with the Controller.cs script which has the function Looking () shown here

 private void Looking (float h, float v) {
     //Called every Update ()
     transform.Rotate (0F, h * sensitivity, 0F);
     Head.Rotate (v * sensitivity, 0F, 0F);
     //Head is the transform for the game object, Head, in Player
 
     if (Head.localRotation.eulerAngles.y != 0) {
         if (Head.localRotation.eulerAngles.x > 270F)
             Head.localRotation = Quaternion.Euler (-90F, Head.localRotation.y, Head.localRotation.z);
         else
             Head.localRotation = Quaternion.Euler (90F, Head.localRotation.y, Head.localRotation.z);
     }//if
 }//Function Looking

Which works wonderfully for the client. How ever trying to do anything with Head only results in changes on the client and not the server.

Picture to better describe the problem alt text

playerhierarchy.png (424.1 kB)
playerhierarchy.png (2.0 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by AlienNova · Oct 24, 2017 at 12:43 AM

Okay, so I found the answer after some more intense reading of Unity's network manual. For anyone else that finds themselves here with the same problem: https://docs.unity3d.com/Manual/class-NetworkTransformChild.html

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image kalibcrone · Dec 10, 2020 at 04:21 PM 0
Share

So what was the answer, lol

avatar image kalibcrone · Dec 10, 2020 at 04:57 PM 0
Share

I have an FPS controller GameObject as the root with a camera as the child to it, probably similar to what you have in this example.

The parent has NetworkIdentity, NetworkTransform client authority = true, and NetworkTransfromChild client authority = true with the head gameobject dropped into the target variable.

$$anonymous$$y player body transform is updated, but the rotation of my player's head is not sent to the other player.

I appear to have the same exact issue has you, and cannot find the solution.

avatar image beakv6_unity kalibcrone · Dec 14, 2020 at 12:20 PM 0
Share

I was wondering the same thing, and I think AlienNova is referring to "Child transform to be synchronized. (Remember, this component goes on the parent, not the child - so you specify the child object using this field)." I was seeing the same issue, until I put the NetworkTransformChild component on the parent object, then set the target to the desired transform child.

avatar image
0

Answer by kalibcrone · Dec 10, 2020 at 05:15 PM

I do not know if you are having the same issue as me, but when I had this issue, I was accidentally only grabbing the transform of my player's head model, but technically it was the head's parent gameobject that was moving the model, so both the gameobject with the mesh renderer for the 3d model as well as the parent gameobject which rotated the model, needed to be dragged into a NetworkTransformChild component on the root gameobject.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

140 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UNET: Flicker when a client moves a non-player object using another non-player-object 1 Answer

In unity3d client “push” an object with a rigidbody2d slower than the host 0 Answers

[UNET] TRANSFORMATION NOT SYNCING 0 Answers

Syncing localScale 0 Answers

Network command is running on client? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges