Secondary Camera Not Following Player & Resolution Changes Based on Camera Size

Hi everyone,

I’m working with two cameras in my Unity project:

  • Cam A – Main camera (renders the entire scene).
  • Cam B – Secondary camera (used only to render my player with a custom shader).

The issue is:

  1. Cam B is not moving with the player.
  • My player moves fine in the main camera, but the secondary camera stays static.
  1. The player’s resolution/appearance changes depending on the player’s size.
  • When my character scales up or down, Cam B seems to render it differently (stretched or pixelated).
  1. Camera positions are different.
  • For testing, I placed one camera at the bottom (near collectibles – random dots) and the other on top.
  • Everything renders correctly in the main camera, but Cam B doesn’t seem to properly align or “collide” visually with the collectibles (sorting layers look fine, and I set the player to the correct camera layer and sorting layer).

I’ve set the layers properly (player only visible to Cam B), and everything is fine on the main camera. But Cam B doesn’t follow the player or keep the resolution consistent.

Any suggestions on how to fix this?

Thanks in advance!

I’m a bit confused about the core premise of your problem. Why are you using two cameras for this?

one is primary camera and other one for shader

Right. I get that. Why are you doing that? Why do you need a special shader for that? What does this shader do? I’m getting the impression you are overengineering your solution to something.

im totally new in this i dont know how the things work i saw tutorial for outline and did this.. u have better solution please tell i want simple outline as whole body not individual segement

The easiest way as a beginner would be to just have sprites that are the same shape as your snake segments but put them below them. If you want to do it as an image effect, you’d be better off learning how render features work instead of trying to use multiple cameras.