Trouble with shadow caster

I’m having trouble getting a shadow to cast onto the ground from the car using a point light. The car mesh is imported and the shadowGenerator code is in. Any ideas where I’m going wrong?

I have this error but I can see the meshes imported:
BJS - [13:19:29]: Unable to import meshes from Error in onSuccess callback: ReferenceError: includeDescendants is not defined

Thank you for any help

Holding the mouse over addShadowCaster reveals this:


So it expects one mesh, and a boolean of whether to include the descendants, but in the playground it’s given the meshes array and undefined variable includeDescendants

It does work when providing (car, true):

1 Like

Fantastic, great help again thanks. I didn’t realise you could mouse hover over the code for tips. Thanks for solving the problem.

1 Like