Giter Site home page Giter Site logo

ryantwarner / netcodecharactercontroller Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 3.0 215.05 MB

A networked third person character controller for Unity3D

C# 82.36% ShaderLab 11.40% HLSL 6.24%
mlapi netcode netcode-for-gameobjects third-person-character-controller unity unity3d unity3d-game-prototype unity3d-game-template

netcodecharactercontroller's Introduction

Netcode Character Controller

This is a base project for a networked third person character controller in Unity3D 2021 HDRP using Netcode for GameObjects 1.0 (MLAPI). It offers minor improvements to the legacy third person character controller in addition to networking support.

License

All sample assets are provided by Unity under the Unity Companion License.

netcodecharactercontroller's People

Contributors

ryantwarner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

netcodecharactercontroller's Issues

Setting linear velocity of a kinematic body is not supported error in 2022.1.0

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.