unityのコードレビューしてくれ。

1デフォルトの名無しさん
垢版 |
2023/03/16(木) 19:49:01.61ID:2Ni9Md6U
unity初めて1日。初心者です助けてわからん↓のどこかが間違ってるらしい
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{
private void FixedUpdate()
{
//Rigdboodyを取得
Rigidbody rigidbody = GetComponent<Rigidbody>();

//方向キーの入力
float x = Input.GetAxis("Horizontal"); //横軸
float z = Input.GetAxis("Vertical"); //縦軸

//ベクトルに変換
Vector3 vec = new Vector3(x.0.z);

//力を加える
rigidbody.AddForce(vec);
}
}
2023/03/16(木) 19:54:46.90ID:vHdvcKrM
(x.0.z)
3デフォルトの名無しさん
垢版 |
2023/03/16(木) 19:56:52.87ID:2Ni9Md6U
まだあるっぽいです。
4デフォルトの名無しさん
垢版 |
2023/03/16(木) 20:31:42.04ID:2Ni9Md6U
寝ます
5デフォルトの名無しさん
垢版 |
2023/03/16(木) 20:35:08.10ID:2Ni9Md6U
書いといてくれ
6デフォルトの名無しさん
垢版 |
2023/03/16(木) 20:40:07.63ID:2Ni9Md6U
エラー内容
All compiler errors have to be fixed before you can enter playmode!
UnityEditor.SceneView:ShowCompileErrorNotification ()
レスを投稿する