本記事の最新版はzennに移行しております。 さて、GameObject(ゲームオブジェクト) の rotation はクォータニオン型なのですが、実際に使われるときはVector3型で行うことも少なくありません。 そして、 Vector3型の使い方がベクトル(方向)と座標と角度の3つあるの ...
矢を物理演算を使わずに飛ばしたかったので、Vector3.Lerpを使ってベジェ曲線で飛ばすことにした 矢を放物線状に飛ばす 以下のScriptを矢のオブジェクトにAdd Componentすると 矢の出現と同時に飛んでいく ※ターゲットと発射元のオブジェクトが必要 Vector3.Distance ...
to be working with Unity Vector3 structs, but can be modified to work with any other 3D (or 2D & 4D or higher) struct/arrays for speedy & light Construction & Reconstruction, to be light on memory, ...