ryantwarner / netcodecharactercontroller Goto Github PK
View Code? Open in Web Editor NEWA networked third person character controller for Unity3D
A networked third person character controller for Unity3D
Thank you for pulling together this prototype for the NetCode Third Person Character Controller. It has saved me a lot of work figuring it out. I think it is nearly there, but I have noticed an error. This error only gets logged when you attempt to move the Player on the 'client' ... the 'host' player (and therefore the server) is fine.
Setting linear velocity of a kinematic body is not supported.
InvalidOperationException: Client is not allowed to write to this NetworkVariable
at Unity.Netcode.NetworkVariable`1[T].set_Value (T value) [0x0003a] in <693656ca012e4e968ef2beda232c1ee7>:0
at Unity.Netcode.Components.NetworkTransform.TryCommitTransform (UnityEngine.Transform& transformToCommit, System.Boolean synchronize) [0x0006d] in <719eea6d5f2c4fb68836733d2ee1d20c>:0
at Unity.Netcode.Components.NetworkTransform.OnUpdateAuthoritativeState (UnityEngine.Transform& transformSource) [0x00038] in <719eea6d5f2c4fb68836733d2ee1d20c>:0
at Unity.Netcode.Components.NetworkTransform.TryCommitTransformToServer (UnityEngine.Transform transformToCommit, System.Double dirtyTime) [0x000b4] in <719eea6d5f2c4fb68836733d2ee1d20c>:0
I had a look into the linear velocity
bug and found this on the forum: https://forum.unity.com/threads/kinematic-rigidbodies-no-longer-holding-velocity-property.1227075/
I tested the theory by commenting out this line: m_Rigidbody.velocity = v;
from the onAnimatorMove
method. I wasn't able to move the player but the error disappeared. I think the error related to writing to the NetworkVariable
must be related to this.
Do you have any thoughts? I will update here if I find a solution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.