Hello, I want to create a big horizontal circle.
TE_SetupBeamRingPoint dont work because is radius limit is 4096.
I have this stocks for a vertical circle but I want to convert it on horizontal circle:
PHP Code:
Circle(Float:vecLocation[3], Float:radius)
{
new Float:angle=0.0, Float:x, Float:y;
new Float:pos1[3];
new Float:pos2[3];
//Create the start position for the first part of the beam
pos2[0] = vecLocation[0];
pos2[1] = vecLocation[1] + radius;
pos2[2] = vecLocation[2];
while (angle <= 2 * PI)
{
x = radius * Cosine(angle);
y = radius * Sine(angle);
pos1[0] = vecLocation[0];
pos1[1] = vecLocation[1] + x;
pos1[2] = vecLocation[2] + y;
TE_SetupBeamPoints(pos1, pos2, BeamSprite, HaloSprite, 0, 0, 8.0, Float:5.0, Float:5.0, 5, 0.0, {255,255,255,255}, 3);
TE_SendToAll();
pos2[0] = pos1[0];
pos2[1] = pos1[1];
pos2[2] = pos1[2];
angle += 0.1;
}
}
Any help? I will continue testing.
EDIT: Solved.
PHP Code:
void Circle(float vecLocation[3], float radius) {
float angle = 0.0, x, y;
float pos1[3];
float pos2[3];
//Create the start position for the first part of the beam
pos2[0] = vecLocation[0] + radius;
pos2[1] = vecLocation[1];
pos2[2] = vecLocation[2];
while (angle <= 2 * FLOAT_PI) {
x = radius * Cosine(angle);
y = radius * Sine(angle);
pos1[0] = vecLocation[0] + x;
pos1[1] = vecLocation[1] + y;
pos1[2] = vecLocation[2];
TE_SetupBeamPoints(pos1, pos2, g_sprite, g_HaloSprite, 0, 0, 0.1, view_as<float>(5.0), view_as<float>(5.0), 5, 0.0, {255, 0, 0, 255}, 3);
TE_SendToAll();
pos2[0] = pos1[0];
pos2[1] = pos1[1];
pos2[2] = pos1[2];
angle += DegToRad(6.0);
}
}
__________________