【3Dゲームエンジン】Unity質問スレッド24 [無断転載禁止]©5ch.net
■ このスレッドは過去ログ倉庫に格納されています
0446名前は開発中のものです。
2016/05/17(火) 14:34:37.72ID:FLvMyiRDfunction Update () {
if (Input.GetButtonUp("Jump") && GetComponent("Rigidbody").velocity == Vector3(0, 0, 0)){
GetComponent("Rigidbody").AddForce((transform.forward + transform.right) * Speed, ForceMode.VelocityChange);
}
UnityEngine.Component.rigidbody' is obsolete. Property rigidbody has been deprecated. Use GetComponent<Rigidbody>() instead.
UnityEngine.Component.rigidbody は廃止されました。リジッドボディプロパティは非推奨です。代わりにGetComponent<Rigidbody>()を使用してください
http://docs.unity3d.com/jp/current/ScriptReference/GameObject.GetComponent.html
'velocity' is not a member of 'UnityEngine.Component'.
velocityはUnityEngine.Componentのメンバではありません
'AddForce' is not a member of 'UnityEngine.Component'.
AddForceはUnityEngine.Componentのメンバではありません。
http://docs.unity3d.com/jp/current/ScriptReference/Rigidbody.html
http://docs.unity3d.com/jp/current/ScriptReference/Rigidbody-velocity.html
http://docs.unity3d.com/jp/current/ScriptReference/Rigidbody.AddForce.html
この辺の意味が分からないなら延々「コピペすれば動くコードをよこせ」と言わねばならなくなる。
Unityはプログラムできることは必須でUnityだけ覚えるとかいう道は基本的にないよ。
■ このスレッドは過去ログ倉庫に格納されています