Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ox, oy, oz is position to start drawing
- //or[3] is first object rotation faced to shoot pos
- new Float:Dist = VectorSize(X, Y, Z);
- //first
- id = CreateObject(19082, ox, oy, oz, 0.0, 0.0, 0.0);
- SetObjectFaceCoords3D(id, fX, fY, fZ);
- GetObjectRot(id, or[0], or[1], or[2]);
- //calc Z
- new Float:alfa = or[1]-180;
- new Float:cz = floatsin(alfa, degrees) * floatsin(90-(alfa/2), degrees) * 20.02; //19082 X offset = 10.01
- for(new i=0;i<ldst-2;i++) //ldst - distance from start to shoot pos
- {
- ox-=floatcos(or[2], degrees)*20.02;
- oy-=floatsin(or[2], degrees)*20.02;
- oz+=cz;
- id = CreateObject(19082, ox, oy, oz, 0.0, 0.0, 0.0);
- SetObjectRot(id, or[0], or[1], or[2]);
- }
- printf("Angle: %.1f, Heigh: %.2f", alfa, cz);
Advertisement
Add Comment
Please, Sign In to add comment