playMaker

Author Topic: Shadows  (Read 169 times)

curb47

  • Sr. Member
  • ****
  • Posts: 254
Shadows
« on: May 24, 2022, 05:11:45 AM »
Hi there.

Not particularly PlayMaker related, but I figured somebody could help.

I'm having trouble getting control of shadows, and casting them. It's weird because some of my objects/models do cast shadows on things, but not on others. The main shadows I need, are shadows on the ground/environment, cast by the players spaceship, and scenery.

You can see on the pictures below, that the grey rocks cast a shadow on the white spaceship, but not on the green ground, also, the spaceship doesn't cast a shadow on the ground either.

Basically, i can't get the ground to receive shadows...








What confuses me further, is that when I play the game and look at the Scene editor window, the shadows are present, but not in the Game window.





Many thanks for any help.

J.
« Last Edit: May 24, 2022, 05:36:16 AM by curb47 »

eros

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Shadows
« Reply #1 on: May 25, 2022, 06:21:27 AM »
How are you lighting the scene? Is your terrain on the same layer as everything else that's receiving shadows properly?

It's possible that the far plane of the camera is closer than your shadow distance setting, in which case Unity will prioritize that for culling shadows. Try bumping shadow distance in Project Settings>Quality. Try changing the terrain shader too, see if that makes a difference.

This might happen with a point light that's outside the FOV of the camera, so maybe check that as well.

curb47

  • Sr. Member
  • ****
  • Posts: 254
Re: Shadows
« Reply #2 on: May 26, 2022, 04:54:25 AM »
Thanks eros, I'll look into your suggestions and get back to you.