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
1
Question by vrbullshit · May 18, 2017 at 11:01 AM · networkingtransformnetworksynchronizing

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

First of all:

  • Unitypackage included

  • Demo video on https://youtu.be/uW3e2g6tabk

In a multiplayer game I need to synchronize the position, orientation, size (transform components) of many non-player game objects over network. Every client can move objects on mouse drag. The transform components are synchronized on all clients. (In this case the player position is not important, because there is no visible player, just the non-player objects' transform components).

Until this point it works fine.

But when a client moves an object on mouse drag and pushes another object whose position is also synchronized all over the network, there is a terrible flicker. Please see the video (link above). However, when you push a non-player object with another non-player object on the host instance of the network game there are no flickers. The movement is smooth then. But most of the time the connected clients do the game interactions. So how can I realize a smooth movement also when a client interacts as described above?

Note: I attached a custom PlayerAuthority script to the player prefab so that each client is able to move objects on mousedrag. Maybe I should also remove the host's authority to update the transform components to avoid conflicts? However I don´t know how it works and if this helps.

Any help would be appreciated. Thank you in advance!

Using UNET I made this example as follows:

  • An empty game object called NetworkManager owns the NetworkManager component. In the slot Spawn Info / Player Unity expects a prefab for each client which connects to the host.

  • The expected Player prefab (in my case called Player6 and located in Resources / Prefabs) contains a NetworkIdentity component (with Local player authority selected), a NetworkTransform component and a custom PlayerAuthority script which allows any client to move non-player objects (so not only the host can interact with the non-player objects).

  • Each non-player object whose transform components are synchronized all over the network contains a NetworkIdentity component, a NetworkTransform component, a custom DraggableXZ script for moving objects on mouse drag, and of course a Rigidbody and a collider.

link text

syncnonplayerobjunitypackage.zip (53.4 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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by RicoCruz · Apr 11, 2020 at 10:29 PM

I know I am almost 3 years late but I have the exact same problem right now. Do you have a solution by now?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

SyncListStruct Not Syncing to Rest of Server! 0 Answers

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

[UNET] TRANSFORMATION NOT SYNCING 0 Answers

Child transform of player object not syncing with server 2 Answers

Syncing localScale 0 Answers


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