[ad_1]
I’ve a participant controller connected to the Player prefab – together with the NGO parts
Network Object Client Network Transform Network Animator
In the Network Manager I’ve the Player prefab added in order that the host & purchasers will spawn when becoming a member of.
The subject I’ve is that the consumer enter from consumer & host is controlling each prefabs on display on the similar time.
On the participant controller script I’ve the road if (!IsOwner) return; at first of the Update() earlier than any motion is known as
The Player Prefab is setup as follows:
-
Player (Has the Network Object & Client Network Transform parts)Parent Obj
-
Controller (Has the PlayerController script connected to it)
-
Model (Has the Owner Network Animator element with the Animator utilized)
Any assist a lot appreciated.
PlayerController replace():
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’m utilizing the New Input System
See the connected video for the problem
[ad_2]