Shadows on Unity iPhone Basic

Hi

I have a game where I want my spaceship to dock into a door in a mothership.

My ship is a 2D sprite using the Particles / Alpha Blended shader.

My Mothership is a full 3d object.

I have baked the lighting into the Mothership so there is a shadow cast across the door where the spaceship is going to dock.

Because the door in the mothership is recessed and my only light is above the mothership in the place that would match the baked lighting, I expected a shadow to be cast across my spaceship when it neared the mothership, but it doesn’t.

Is this because of the Parciles / Alpha Blended shader in use on my spaceship, or is that irrelevant? If it is for that reason, is there a shader I can use for displaying a transparent sprite that will receive shadows?

I am using Unity Indie and iPhone Basic.

Thanks

Hello!

Are you sure you can use shadows on iPhone basic?, as far as I know you cannot us real time shadows on unity Indie :S

No i’m not. In fact I think even iPhone Advanced may not support realtime shadows.

Just looked at the version comparison page and realtime shadows are not listed for either of the Unity iPhone version. However, there is no mention of this in the Unity Manual under iPhone limitations.

If shadows are not supported, how can you I make it look realistic when my ship enters the doc? It is always going to look odd.

well, try to use a projector! :smile: (now that we both know that realtime shadows are not supported :P)

that could help :smile:

Thanks

I haven’t come across Projectors before. so i’ll take a look at the manual.

I presume this is going to be me projecting an image of the shadow over the ship when it is in the doorway. Is that right?

yep, that’s the idea :smile:

Unity iPhone 1.5 comes with iPhone Standard Assets (it’ll show up if you create a new project, or do an Import Package) and a blob shadow projector is included, similar but not exactly the same as the blob shadow projector included in the non-iPhone version of Unity.

It’s a good ideal to read the manual section on projectors (especially if you want to customize it, replace the shadow texture…), but basically you should be able to drag the shadow prefab where you want and point it the right way (kind of like a spotlight), and tweak the parameters. I think that new iPhone blob shadow is used in the Penelope example project.