ECS Kinematic Character Controller and Input System "Keymapping"

Hello So I have started using ECS and NetCode For Entities, for a personal project, I’m attempting to make an RPG despite all odds of them being profitable or success rate, in my venture of doing this I have been attempting to follow the Character Controller Sample in connection with the ECS samples. In doing so I have come across a few minor details that I am not understanding…
Firstly the Platformer sample, despite the complexity I seem to understand a lot of what’s going on with the code base, however when I try to convert it to NetCode there are several issues I was faced with such as the Dash state not returning to grounded state and therefore breaking the Velocity of the kinematic character, Maybe this sample is unable to be converted? The standard characters works fine.
However my goal is essentially to add Statemachine functionality so a detailed documentation or extra comments in the sample would be highly beneficial.

A Second issue i am having while using the new IInputComponentData class, is that the method “WasPrssedThisFrame()” is not being read. the IsPressed() method is being read but causes the character to jump twice on lower framerates. Is there a solution for the input system in ECS, I am aware on the New Racing Sample they also have used the new input system however they are using the old Inputs for key press rather than the ReadValue<>() methods, is there any further work being done on the input system to support netcode functionality?

Thank you for taking time to Read this Topic, any assistance from anywhere would be greatly appreciated

I believe in you!

Have you checked out the OnlineFPS sample? It might be a better starting point for a NetCode project (or at least a good reference how to set up input and movement to work with prediction, etc).

I have briefly looked over the Online FPS section while looking through the platformer sample on GitHub, to see comparison between the two samples. I have been extracting pieces from different unity samples to understand workflow and also functionality. The Online FPS uses the first person character approach and I was more looking towards the third person character approach with use of the orbital camera… however I think one of the issues I was having while trying to convert the platformer example was the camera’s rotation not being synced and grounding not being updated after dashing, I only got as far as adding, “Ground Move, Air Move and Dashing state” before I started to notice problems and had to revert back on source tree to when I had added only the standard characters samples into my project. I’m now questioning the appropriate way to manage state machines and move vectors in regards to camera orientation.

In regards to input im just curious if im forced to use “GetKeyDown” and such methods at the current time

if (actions.Jump.WasPressedThisFrame())
{
    input.ValueRW.Jump.Set();
}

followed by this in fixed step system
characterControl.JumpHeld = playerInputs.Jump.IsSet;

also a further question in regards to Aspects, should i refrain from using these as they are planning to deprecate them in the future, If so how do i go about doing that? as a lot of the samples use aspects for storing references and also have methods which are used by various systems

After looking at the Online FPS, I have changed how some of the input’s were being read, however that sample uses First Person View, whereas I would like to attempt a third person view, the platformer sample has a great starting ground for what I want to achieve however I was having an issue when attempting to jump and dash state was not Re-grounding… StateMachine behaviour is the goal.
I appreciate the help with pointing me in the direction for getting my input’s read correctly :smiley:

The base of my code is similar to that of the standard characters third person so far, which is very similar to the online FPS par the first person view… just need to figure out how I can separate the states. to work with NetCode.