Hi,
I've followed official tutorial on how to make a 2.5D game using adventure creator, since I'm making a 2.5D point n click game, and I ran into a problem with shadows when implementing the 2D camera in order to achieve the parallax (a.k.a. scrolling) effect, since that cannot be achieved using default 2.5D cameras that are static and I needed a camera that can also follow my player on x axis only.
So I read a thread on this forum on how to achieve a parallax effect and the solution is to just use 2D camera (instead of 2.5D) and to convert your image from texture to sprite that you then import in the scene and adjust so that it fits the camera that is suppose to follow the player.
That works great and I achieved parallax effect, but solving this problem created another one. Now I can't see character shadows on the plane that is in front of that background sprite despite using MatteShadow material that I'm also using on every other plane in my game (as you did in 2.5D tut.) So I can see players shadows on every plane in the game except on the one that is located in front of the 2D camera that I use for achieving the parallax effect on that part of the level...
I put some screenshots how it looks normally (in other scenes) and how disorted it looks in that in which I use 2D camera because of the needed parallax.
the scene that is problematic:
example of the scene that I get normal shadowing in:
Solution for now is to disable mesh renderer in order to hide this weird looking plane, but then I don't have player's shadow and that's a problem since I do get a shadow in every other scene (i.e. when I switch to any other camera in my game/scene)
how it looks when I disable mesh renderer component of the plane that is player located on:
(note there is no shadows, the first one looked disorted, but there were shadows at least...)
how my scene looks like in inspector (the big sprite is for the scene that I want to achieve the parallax effect in ) :
stuff that is attached on the camera that I use for achieving the parallax in that scene:
how every other camera looks like:
Any tips?
Comments
Now that you're using the shader in a way that wasn't intended to begin with, I'm afraid I really don't know what to suggest. I would recommend posting on the Unity forums instead, as this is a more general Unity issue regarding shadows, shaders and cameras, rather than anything specific to AC.