Originally Posted By: Random
I know how to create lights ect..
But I don`t know how to move lights (in while loop)

What I meen:
Code:
sc_light_create(vector(camera.x, camera.y, camera.z), 1000, vector(25,25,25), SC_LIGHT_SPOT | SC_LIGHT_SPECULAR | SC_LIGHT_SHADOW , vector(camera.pan, camera.tilt, camera.roll), 90);



This creates a light. I can`t put it in a while loop, otherwise it would constantly create lights and kill my fps.

Is there a way to set shade-c lights to moving objects without killing fps?

Random


You need pointer of this function to work in a while loop like this:

Code:
ENTITY* spotlight1 = sc_light_create(vector(camera.x, camera.y, camera.z), 1000, vector(25,25,25), SC_LIGHT_SPOT | SC_LIGHT_SPECULAR | SC_LIGHT_SHADOW , vector(0, -45, 0), 90);

	while(1)
	{
		spotlight1.pan += time_step*.5;
		//update the spotlight
		sc_light_update(spotlight1);
		wait(1);
	}



Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P