I have a player controller attached to the Player prefab - along with the NGO components
Network Object Client Network Transform Network Animator
In the Network Manager I have the Player prefab added so that the host & clients will spawn when joining.
The issue I have is that the user input from client & host is controlling both prefabs on screen at the same time.
On the player controller script I have the line if (!IsOwner) return; at the start of the Update() before any movement is called
The Player Prefab is setup as follows:
Player (Has the Network Object & Client Network Transform components)Parent Obj
Controller (Has the PlayerController script attached to it)
Model (Has the Owner Network Animator component with the Animator applied)
Any help much appreciated.
PlayerController update():
void Update()
{
if(!IsOwner) return;
if (!rigidbody || !animator) return;
currentVelocity = rigidbody.velocity;
GetAxisHistory();
GetTargetHeading();
GetLocomotionState();
GetTurnSpeed();
if (currentAnimationStates.HasFlag(AnimationPlayerStates.Pivoting))
{
SetTurnParams();
}
else if (TurnTriggerIsSet())
{
SetVelocityToCurrent();
}
else
{
TurnCheck();
SetLocomotionVelocity();
}
}
I am using the New Input System
See the attached video for the issue

