help with normalmap lighting

Blitz3D Forums/Blitz3D Beginners Area/help with normalmap lighting

Mr Snidesmin(Posted 2006) [#1]
I have a bug that in this code that I can't figure out:



For some reason the transformed position of the light alternates between 2 values each cycle, causing the cube to "flicker".

Can anyone figure out why this is?


Mr Snidesmin(Posted 2006) [#2]
it's okay.. . I fixed it by adding this line:

PositionEntity pivot, x, y, z
AlignToVector pivot, nx, ny, nz, 3
RotateEntity pivot, EntityPitch(pivot), EntityYaw(pivot), 0

for some reason the roll was alternating and thinking of it the roll should always be zero anyway. . .