rotate object but keeping lighting fixed problem !

Started by
-1 comments, last by BelkacemTuxLm 12 years, 4 months ago
hi again !

i am using directx11 , and i create light source ( parallel light source )and scene ( loaded from obj file ) , and every thing look correct but when i rotate some object in the scene , my light rotate too with the object , and i don't wont to rotate the light and keep it fixed .

i try to fix the problem by do something like this :

XMMATRIX light_rotat = XMMatrixIdentity()

/*render the light*/


XMMATRIX light_rotat = XMMatrixRotationY(timeGetTime()/3500.0f);

/* render scene */




This topic is closed to new replies.

Advertisement