[過去ログ]
【海栗は】Unity 5スレ目【プリンと醤油で代用】 (926レス)
上
下
前
次
1-
新
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
67
:
名前は開発中のものです。
[] 2011/09/12(月) 00:30:09.90
ID:ytoeYGNZ(1/14)
AA×
[240|
320
|
480
|
600
|
100%
|
JPG
|
べ
|
レス栞
|
レス消
]
67: 名前は開発中のものです。 [] 2011/09/12(月) 00:30:09.90 ID:ytoeYGNZ using UnityEngine; using System; using System.Collections; public class enemijioTransform : MonoBehaviour { public Transform target; public float deg = 30.0f; float CosradZ=0.0f; float SinradZ=0.0f; void Update() { Vector3 relativePos = target.position - transform.position; Quaternion rotation = Quaternion.LookRotation(relativePos); transform.rotation = rotation; float deg=transform.rotation.y; float rad = deg * Mathf.Deg2Rad; Debug.Log(deg + "degrees are equal to " + rad + " radians."); Debug.Log("Mijioenemy X " + transform.position.x ); Debug.Log("Mijioenemy Z " + transform.position.z ); Mathf.Cos(rad); Debug.Log("Cos(rad) " + Mathf.Cos(rad)); Mathf.Sin(rad); Debug.Log("Sin(rad) " + Mathf.Sin(rad)); CosradZ=Mathf.Cos(rad); SinradZ=Mathf.Sin(rad); Transform t = transform; t.position += new Vector3(CosradZ, 0.0f, SinradZ); }} よく考えないままに作ってたらこんなターゲットからぶっ飛んでいくものができてしまった・・・ ターゲットに近づいていくものが作りたかったのに。 http://mevius.5ch.net/test/read.cgi/gamedev/1315623306/67
よく考えないままに作ってたらこんなターゲットからぶっ飛んでいくものができてしまった ターゲットに近づいていくものが作りたかったのに
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 859 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
ぬこの手
ぬこTOP
0.034s