Create the object and move it to the front and explode when colliding with an object, how would you do that?
That the object is believed in the position of the camera and moves in direction to where the camera points, how would that be?
Code:
new Float:fVX, Float:fVY, Float:fVZ;
missile[playerid] = CreateObject(345,fVX,fVY,fVZ, 0.0, 0.0, 0.0);
MoveObject(missile[playerid],fVX,fVY+10,fVZ, 10.00);
That the object is believed in the position of the camera and moves in direction to where the camera points, how would that be?
Code:
new Float:fPX, Float:fPY, Float:fPZ;
new Float:fVX, Float:fVY, Float:fVZ;
GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
new Float:fVX, Float:fVY, Float:fVZ;
missile[playerid] = CreateObject(345,fVX,fVY,fVZ, 0.0, 0.0, 0.0);
MoveObject(missile[playerid],fVX,fVY+10,fVZ, 10.00);