Unity3D: I want my moving 3D objects to have a consistent shading - unity3d

I have 2 directional lights in the scene, light 1 is parallel to the Y axis (I want it to make a shadow underneath the sphere), light 2 is parallel to the x axis.
I have some barriers(3d cube objects) that are moving to the left side of the screen( velocity = (-20,0,0) ).
I want the barriers to have a consistent color/shade while moving through the scene. When the object is on the right side of the screen it is darker and as it moves to the left, right before it moves off the screen, it gets brighter. I can't figure out why!
What I've done:
I found if I remove all lights from the scene the effect doesn't happen.
I've removed all other objects from the scene.
In the lighting options I've turned off RealtimeGI and Baked GI.
I've removed the Skybox and turned Ambient Intensity, Reflection Intensity to 0.
Here is the effect to help understand it more:
Barrier
Barrier moved
Thanks if you can help me out!

It looks like it had more to do with the orthogonal camera. I noticed that if I move the camera source point further away, the effect disappeared. My guess is the angle of my camera and how close it was to my main scene intensified the color so it showed it as brighter.
That is my guess anyways, If someone has a better answer please let me know!

Related

How to make Quads flush with each other

I'm making a game where I move a red cube across a plane with arrow keys (I am setting the velocity in order to get a constant speed) Here is a preview:
game
Currently, I am just using a plane with a grid material/texture. However, I wanted to change one of the tiles in this grid to a different color and detect when my cube passes over it.
My idea was to simply replace the plane with a bunch of quads. However, when I do that and try to navigate my cube across the quads, it seems to collide with the side of the quad and flip up, despite the fact that they are all at the same height and positioned right next to each other.
Is there a way to make the quads flush so when I push my cube over it, it won't collide with the side of the quads? Is there a better way to create this behavior?
You can disable colliders at this quads and add invisible big plane with collider

Unity2d why I don't see game tab, it's blue only

I have sought for the answer for so long (15 minutes :D), please help me! Thanks!
The blue you are seeing is the default color for the camera when you set The clear flags variable to SolidColor, so your camera is probably okay..
Its most likely behind your sprites. Check the camera's Z position, and place it front of them, unity's 2D is actually 3D, you can switch to 3D mode and see what's ur camera's position in the z axis.
edit: Just switch to 3D mode and see it, your camera is a child GameObject, so the coordinates are in local Space,it'll be hard to tell wether or not the camera is in front of anything.

How to roll a cube on it's edges on Unity 3D

I want to move a cube by making it roll on it's edges. The cube will be standing on a x-z grid and each movement it takes will make it stand on a different square of the grid.
The player will controll the movement and will only be able to make the cube roll on one direction at a time (left, right, forward or back), but the cube must always stand exactly on top of one of the grid's squares.
I don't think applying a force to the cube will help cause it could move it a little bit too much or too little. I want to achieve something like this: https://www.youtube.com/watch?v=yaAIUYuNi84 but only on the x-z plane. Notice how on each corner the cube can stop and change direction with ease, because it never moves too much or too little.
Any ideas on how to approach this?
If you are new to the Unity it will be useless to trowing you a bunch of codes so i am telling you the way of doing it so you can implement your own codes.
You can create 4 empty game object which will always follow the cube on the floor and when you want to roll the cube you will rotate the cube around the empty objects.
You can find the codes for following the cube and rotating the cube on youtube, and for the starters searching is allways good.
So i hope you can manage it out, if you cant please write me again where did you stuck and i will be happy to answer you :)

Unity3D - Light deactivated when facing opposite direction

I placed a light in my scene.
It is lighting the ground when i'm facing that light but when I turn the opposite direction, the light on the ground vanishes.
I think this might be some Unity's default behaviour.
Is there a way I can solve this issue?
Unity uses frustum culling to save performance, so it only draws items that are within the camera's viewing area. As a result of this, the particles behind you are not drawn, and any lights attached to them aren't either.
Scene-crucial lights aren't normally attached to particles, so it's normally not a concern if they're hidden along with their particles.
For conventional lights (not attached to particles), Unity should render the light as long as it affects objects within the camera frustum. If you use a conventional light, you should see better results.
Looks like you may have to disable occlusion culling. Unity3D Manual

Creating layers with different Z-Axis positions in SpriteKit?

The scene
I was wondering about creating
different layers with different Z-Axis values to give more reality like the above picture as it has
1- The green background then
2- The play ground it self then
3- The blurred black trees representing the camera depth of field
So, I thought about Creating the green background then the the black ground with more value of zPosition then the blurred stuff scaled up with more zPosition values, but the problem is when camera moves there is no sense of reality of speed of movement for each layer as they all move together respecting the same positions .
Also I thought about using SceneKit instead as it contains full 3D tools , but the scene is 2D and does not seem to need scenekit.
Thanks in advance as the question seemed too complicated.
Okay, it is figured now.
The answer is gonna be that I put a method that makes the background moves against the camera movement direction with one half or third the camera speed.
As an example
If the camera moves 20 pixels to right , all scene layers seems to be moved 20 pixels to left . So I have to move the background about 8
pixels to right
So all layers seem to be moved 20 pixels to left except that background moved 12 to left, which is slower.