コード例 #1
0
ファイル: Ship-AI.cpp プロジェクト: Luomu/pioneer
void Ship::AIModelCoordsMatchSpeedRelTo(const vector3d v, const Ship *other)
{
	vector3d relToVel = other->GetVelocity() * GetOrient() + v;
	AIAccelToModelRelativeVelocity(relToVel);
}
コード例 #2
0
ファイル: Ship-AI.cpp プロジェクト: GAlexx/pioneer
void Ship::AIModelCoordsMatchSpeedRelTo(const vector3d v, const Ship *other)
{
	matrix4x4d m; GetRotMatrix(m);
	vector3d relToVel = m.InverseOf() * other->GetVelocity() + v;
	AIAccelToModelRelativeVelocity(relToVel);
}