public void UpdatePlayerMovement(ClientPlayerMovement msg) { if (body == null) { Create(); } body.SetActive(true); var arms = (ArmsController)playerView.GetComponent(typeof(ArmsController)); if (arms != null) { arms.SetWorldIKTarget(null, null); UnityEngine.GameObject.Destroy(arms); } animator.updating = true; smoothTransform.SetEnabled(); var subroot = GuidHelper.FindComponent <SubRoot>(msg.subGuid); var newPosition = (subroot != null) ? (msg.subPosition + subroot.transform.position) : msg.position; SetSubRoot(subroot); SetPilotingChair(null); SetVehicle(null); smoothTransform.Correct(newPosition, msg.bodyRotation, msg.velocity, msg.timestamp); animator.Correct(msg); }
public virtual void Enter(RemotePlayer player) { activePlayer = player; smoothTransform.SetEnabled(); }