I’m making an airplane for the airstrikes, I added two entities for radiant (startposition, and stopposition), the airplane has to fly between these two spots in a ‘parabole flight’…but I can’t let the plane fly from point a to point b … so I better forget the parabole flight.
I’m setting a dir vector to the stop-spot and then I move the plane with vectorMA to that stop spot by using the speed, and the dir vector. But It won’t work :sad:
the Airstrike_Gen is called by a cmd.
=============
void Airstrike_Gen( gentity_t *ent ) {
gentity_t *plane;
//vec3_t start, dir;
plane = G_Spawn();
plane->classname = “airstrikeplane”;
plane->nextthink = level.time + 10;
plane->think = Airstrike_Think;
plane->r.ownerNum = ent->s.number;
plane->parent = ent;
plane->s.eType = ET_AIRSTRIKE;
}
void Airstrike_Think( gentity_t *self ) {
/*
some code cut
stopSpot represents the ‘stopposition-entity’ that is placed in the map by radiant.
*/
VectorSet( dir, stopSpot->r.currentOrigin[0], stopSpot->r.currentOrigin[1], stopSpot->r.currentOrigin[2] );
speed = 50;
VectorMA(self->r.currentOrigin, speed, dir, self->r.currentOrigin);
trap_LinkEntity(self);
//Prepare for next move
self->nextthink = level.time + 10;
}
============
fretn ‘damn vectors :sad:’