When the player shoot, I want to create a point light on the hit point so I can have something like bullet impact light effect.
Here is the code that I tried:
D3DLIGHT9 light;
light.Type = D3DLIGHT_POINT;
light.Diffuse = D3DXCOLOR(255.0, 255.0, 0.0f, 255.0f);
light.Position = hitPoint;
light.Range = 100.0f;
light.Attenuation0 = 50.0f;
light.Attenuation1 = 50.0f;
light.Attenuation2 = 0.0f;
device->SetLight(2, &light);
device->LightEnable(2, TRUE);