レス書き込み
スレへ戻る
写
レス栞
レス消
【3Dゲームエンジン】Unity質問スレッド34
PC,スマホ,PHSは
ULA
べっかんこ
公式(スマホ)
公式(PC)
で書き込んでください。
名前
メール
引用切替:
レスアンカーのみ
>>448 > 質問、今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のアニメーションを止めているんだけどその時に一緒に書いてある画像反転も止めてしまうからそれをどうにかしたい、わかる人お願いします
ローカルルール
SETTING.TXT
他の携帯ブラウザのレス書き込みフォームはこちら。
書き込み設定
で書き込みサイトの設定ができます。
・
ULA
・
べっかんこ(身代わりの術)
・
べっかんこ(通常)
・
公式(スマホ)
・
公式(PC)[PC,スマホ,PHS可]
書き込み設定(板別)
で板別の名前とメールを設定できます。
メモ帳
(0/65535文字)
上
下
板
覧
索
設
栞
歴
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.011s