ゲームプログラムなら俺に聞け30
■ このスレッドは過去ログ倉庫に格納されています
0391デフォルトの名無しさん
2014/02/06(木) 17:11:58.81The players are here.
Black( x1 , y1 , z1 )
Red( x2 , y2 , z2 )
Brown( x3 , y3 , z3 )
Green( x4 , y4 , z4 )
The barycenter is given by this formula.
Barycenter( x5 , y5 , z5)
x5 = ( x1 , x2 , x3 ) / 3
y5 = ( y1 , y2 , y3 ) / 3
z5 = ( z1 , z2 , z3 ) / 3
Then you can get a vector which the Green Player should to go.
The vector is Barycenter to current Green Player position.
■ このスレッドは過去ログ倉庫に格納されています