The question is answered, right answer was accepted
Help with setting up 2D auto scrolling camera using Cinemachine
Hi,
I just started using unity like 2 weeks ago and I have been mostly playing around with it to see how it works and whatnot. Now I want to create something worthwhile with it (mostly for learning purposes). So I am working on a 2D platformer and I have been using Cinemachine for cameras. Now I want to create a auto scrolling level but I am having trouble setting up Cinemachine to do that. I have looked around on Google but I couldn't find a suitable answer regarding this. Most of them suggest using transform.translate but I don't know how I am to apply that to a Virtual Camera. Basically what I want is for the camera to auto scroll on x-axis while still following the vertical movements of the player. I don't know how to approach this so any help would be appreciated.
Thnx.
Edit: So I did manage to create an autoscrolling camera by having cinemachine follow a placebo object that follows a trail I set up however I still don't know how to make the camera follow the player vertically too.
Edit (2): The fix I found was turning off cinemachine brain at specific triggers that enable the auto scrolling sections and manipulate the main camera through script.
Answer by Cuttlas-U · Apr 27, 2020 at 08:03 AM
Hey, its better u dont work with Cinemachine at all , actually I'm working with unity for 6 years and i barely use it , its good for making cinematic actions but so far i didnt find any need for it ,
working with Translate is so much easier then cinemachine , the problem here i think is that u had bad start and maybe bad refrence in order to what to use in unity ,
so i suggest you to watch some begginer tutorials like moving objects then scrolling the levels means simply moving objects in different directions with different movement speeds;
You could be right. I basically started with Cinemachine and I find it comfortable to work with. I should probably look into what you suggest but I wanna hold onto Cinemachine just a little bit longer before I abandon it.
dont abondon it , cinemachine makes u happy because it requires less coding , but soon u need to do code too , good luck ;