You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
The text was updated successfully, but these errors were encountered:
Ok, I was able to get rid of the linear velocity error by changing that line to: m_Rigidbody.MovePosition(m_Rigidbody.position + v); - although it makes the speed of movement crazy fast.
It also didn't fix the issue with writing the NetworkVariable ... this seems to be unrelated after all.
It must be an issue with the client writing the server variable. Any tips on where this would be happening?
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.
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 theonAnimatorMove
method. I wasn't able to move the player but the error disappeared. I think the error related to writing to theNetworkVariable
must be related to this.Do you have any thoughts? I will update here if I find a solution.
The text was updated successfully, but these errors were encountered: