Circle particle

kazuemon

Пользователь
Code:
Level level = Server.getInstance().getDefaultLevel();


					Vector3 vector = new Vector3(144.5,45,153.5);
					double y = vector.y;
					DustParticle particle = new DustParticle(vector,255,255,255);
					int radius = 3;

					for (int i = 0; i <= 360; i ++){

						double ret;
						double deg = i;
						ret = Math.toRadians(deg);

						double x = vector.x + ( radius * Math.cos(ret) );
						double z = vector.z + ( radius * Math.sin(ret) );

						particle.setComponents(x, y, z);
						level.addParticle(particle);
 

kazuemon

Пользователь
I'm sorry, you will not be able to make a plug-in now.
Please refer to because you write a description.
(I use the Google translation)

Code:
// Store the Level object
Level level = Server.getInstance().getDefaultLevel();

// Radius
int radius = 3;

// Vector
int x = 144.5;
int y = 45;
int z = 153.5;

// RGB
int r = 255;
int g = 255;
int b = 255;

Vector3 vector = new Vector3(x,y,z);
double y = vector.y;
DustParticle particle = new
DustParticle(vector,r,g,b);

for (int i = 0; i <= 360; i ++){

	// ret : Variable for storing the calculation result
	double ret;
	double deg = i;
	ret = Math.toRadians(deg);
	double x = vector.x + ( radius * Math.cos(ret) );
	double z = vector.z + ( radius * Math.sin(ret) );

	particle.setComponents(x, y, z);
	level.addParticle(particle);
}
 
Top