override protected void HandleStateChanged(OnStateChanged e) { if (e.State != EPlayerState.HUMANOID) { return; } transform.localPosition = e.Transform.localPosition; //transform.rotation = Quaternion.Euler (0f, 180f + e.Transform.rotation.eulerAngles.y, 0f); transform.rotation = Quaternion.Euler(0f, e.Transform.rotation.eulerAngles.y, 0f); }
override protected void HandleStateChanged(OnStateChanged e) { if (e.State != EPlayerState.SQUID) { return; } transform.localPosition = e.Transform.localPosition; // Vector3 rot = transform.rotation.eulerAngles; // rot.y = 180f + e.Transform.rotation.eulerAngles.y; // rot.x = -90f; transform.rotation = Quaternion.Euler(0f, e.Transform.rotation.eulerAngles.y, 0f); }
protected virtual void HandleStateChanged(OnStateChanged e) { }