Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: curb47 on May 24, 2022, 05:11:45 AM

Title: Shadows
Post by: curb47 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.

Title: Re: Shadows
Post by: eros 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.
Title: Re: Shadows
Post by: curb47 on May 26, 2022, 04:54:25 AM
Thanks eros, I'll look into your suggestions and get back to you.