You know how in all those great horror games and such they have those nice little flashlights that “lag” when you turn or move like you were turning in real life? Something like this:
kF_tZhTI9uo
How would I replicate this? I am using LWJGL and so far in the update code for the camera I have this:
flashLight.setDirection(camera.getForward());
flashLight.getPointLight().setPosition(camera.getPos());
I was thinking of using a lerp funtion, but I am not quite sure how to do the maths for those and I am going to research that now, but I was wondering what you guys thought about it!
Thanks,
-cMp