Jump to content

Recommended Posts

Posted

Seems like this may have come up before but I can't find a solution on the forums or the documentation.

 

I load a map with a default light. The trees and brush and CSG cast shadows correctly. But when I load a model via code, it does not. I've made sure that in the editor the materials are set to cast shadows and the model has a shadow shader and I set the model's SetShadowMode to Light::Dynamic via code right after I load the model. What could I be missing?

Posted

Great thought. It was static before so I switched it but the moving model still doesn't cast shadows.

 

I did throw the model into the scene just as a sanity check and the standing model does cast a shadow, both in the editor and in the game. The model is parented to a pivot which is a character controller but that shouldn't matter, right?

Posted

Wow. It was the pivot. When I did

 

pivot->SetShadowMode(Light::Dynamic);

 

the shadow came on (regardless of if I did it with the model itself). Very interesting. I don't remember this being needed before but my memory isn't what it once was.

 

Thanks guys.

  • Upvote 3

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...