【3Dゲームエンジン】Unity質問スレッド34at GAMEDEV【3Dゲームエンジン】Unity質問スレッド34 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト457:名前は開発中のものです。 18/03/14 15:49:01.87 sLRo/hkc.net 質問、今2dのマルチプレイゲームを作っているんだけどキャラクターアニメーションの同期がわかんねえ void FixedUpdate () { if (!gameClear) { if (!isLocalPlayer) { return; } float x = Input.GetAxisRaw ("Horizontal"); if (x != 0) { rigidbody2D.velocity = new Vector2 (x * speed, rigidbody2D.velocity.y); Vector2 temp = transform.localScale; temp.x = x; transform.localScale = temp; anim.SetBool ("Dash", true); if (transform.position.x > mainCamera.transform.position.x - 4) { Vector3 cameraPos = mainCamera.transform.position; cameraPos.x = transform.position.x + 4; mainCamera.transform.position = cameraPos; } Vector2 min = Camera.main.ViewportToWorldPoint (new Vector2 (0, 0)); Vector2 max = Camera.main.ViewportToWorldPoint (new Vector2 (1, 1)); Vector2 pos = transform.position; pos.x = Mathf.Clamp (pos.x, min.x + 0.5f, max.x); transform.position = pos; } else { rigidbody2D.velocity = new Vector2 (0, rigidbody2D.velocity.y); anim.SetBool ("Dash", false); } isLocalPlayerでDashのアニメーションを止めているんだけどその時に一緒に書いてある画像反転も止めてしまうからそれをどうにかしたい、わかる人お願いします 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch