//ここで角度を回す
void rotateMatrix( float Rad )
{
//行列初期化
D3DXMatrixIdentity( &posMat );
D3DXMatrixIdentity( &rotMat );
D3DXMatrixRotationZ( &rotMat, Rad );
for( int i = 0; i < 4; i++ ){
//回転を座標変換で反映させる
D3DXVec2TransformCoord( &z, &z, &rotMat );
}
//変換した値を戻す
MoveMatrix( v, x1, y1, 0.0f );
void Dire()
{
//ここで角度を出す
//自分の位置 - 敵の位置
tmpRad = atan2( A.y - Z.y, A.x - Z.x );
}
宜しくお願いします
