0
$\begingroup$

I am making my first video game in the Blender Game Engine. My game is a zombie survival game where you have a gun and shoot zombies and try not to die. The game has a character which has a dim flashlight which is parented to the camera. In the viewport the spot lamp casts shadows but when playing the game the lamp does not. It is very unrealistic and makes the game feel a bit fake. Could anyone help?

$\endgroup$
  • 1
    $\begingroup$ Is the spot on-axis with the camera or offset? Also, check the shadow properties under the lamp's object data tab. $\endgroup$ – bertmoog Jul 22 '17 at 0:56
  • $\begingroup$ The spot lamp's origin is lined up exactly with the camera's origin. The spot lamp is set to variance shadow. The spot lamp still shines on things, it just doesn't cast shadows. $\endgroup$ – Caden Mitchell Jul 22 '17 at 1:13
  • $\begingroup$ Theoretically, it shouldn't cast any perceptible shadows if it's on the camera's origin. It would be like having a flashlight in your eyeball. Offset it to the shoulder or the firearm and see if casts shadows then. $\endgroup$ – bertmoog Jul 22 '17 at 2:05
  • 1
    $\begingroup$ Thank you so much! That actually solved my problem! I didn't realise it was so easy to fix! $\endgroup$ – Caden Mitchell Jul 22 '17 at 2:16
  • $\begingroup$ Hey, no problem, glad it worked for you $\endgroup$ – bertmoog Jul 22 '17 at 2:21
0
$\begingroup$

I just had to move it down. Apparently you can't see the shadows if the object lines up with your camera exactly! Thank you bertmoog!

enter image description here enter image description here

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.