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 Kacer · May 30, 2011 at 09:46 AM · mouselooknetworkviewsynchronizing

NetworkView, Mouselook and syncing

Hello

I have an issue with synchronizing the Y-axis on the weapon in an FPS im working on.

What happens when i try to synchronize the position of the weapon is that half of the frames you will see the gun in its intended position, but when you stop moving the gun, the position gets reset to its original position.

My gameobject Hiearchy is set up like this:

 root(the base mesh, the character)
 |-Camera with a mouselook
 |-Gameobject with a mouselook
  |-My gun

I have a networkview on the gameobject and the Root, to synchronize the movement, but with this setup i get the bug i described above. I have tried the same setup, with a slight change:

 root(the base mesh, the character)
 |-Camera with a mouselook
 |-Gameobject without a mouselook, still with the network view though
  |-My gun

what i did in this setup was to attack a script to the camera with these lines of code in it:

 public GameObject objects;
 void Update () {
     objects.transform.rotation = transform.rotation;
 }

the issue i got with this method was some extremely choppy movement and lag between the gun and the Camera. the position of the Gun did get synchronized without any issues though.

Lastly i tried to have the gun as a child to the camera, which didnt work because all cameras but your own is disabled, which means that the rotation of the camera isnt synchronized.

So please help me out here, im more or less at my wits end, only thing i havnt tried yet, which i know of, is black magic.

Thanks in Advance

-Kacer

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 roamcel · Aug 22, 2011 at 02:10 PM

I don't fully understand your setup however I have three suggestions:

 1- increase tickrate
 2- use LateUpdate
 3- implement interpolation

Approaches:

 1- edit=> project settings=> network. increase the value to 25 and verify if situation changes
 2- if you have an animation running and your weapon is part of that animation, whenever you change the transform you need do it in the lateupdate, otherwise the transform gets overwritten
 3- this is tricky. exclude the other two first.
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 Kacer · Aug 22, 2011 at 02:44 PM 0
Share

I have already implemented interpolation and lateupdate, could you please explain me what Tickrate is all about?

avatar image roamcel · Aug 23, 2011 at 04:45 AM 0
Share

'tickrate' is just a way to tell about the rate at which network packets are sent.

open your project and access the edit menu, and from there, project settings=> network increase the 'Sendrate' value. This is basically the number of times a second that your networkViews will synchronize their observed object over the network.

avatar image SilverTabby · Aug 23, 2011 at 04:57 AM 0
Share

Tick-rate is basically the fps of your network packets. Low values cause stuttering, and high values increase network overhead.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Mouselook.js don't move smooth, its jittery 4 Answers

reset camera position mouselook 1 Answer

Mouse look script help 1 Answer

Mouselook forward wrong? ... 1 Answer

Mouselook rotate around two axis. 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