- Home /
How can I do a smooth tracking camera, using the animator controller?
Hello, I need a tracking camera, that follows the character (in 2d), when he is running right, put the player in the left, when stopps, put in the center, and if he is running to left, put the camera tracking more to the left.
I want to use a new script in the object camera, that uses de controller animator of th script in the character object, for checking in the update the variables in the animator, for example, if the "velocity" variable in animator is more than 0, tracking the character and put he in the left.
are there some tutorials for this? or how can I do it?
thanks
Answer by AlwaysSunny · Nov 04, 2014 at 07:01 PM
Sounds like you've solved your own issue - there's nothing wrong with the approach you describe.
Designate a target for your camera to follow, then have it move "lazily" to keep the target centered. (In other words, move to keep the VIP centered, but limit the rate of motion). This should create the behavior you describe with a few lines of code.
No, I ask for using a animator parameters in a script without that animator. And put the player in the left when he is looking to the right and vice versa. And compare with a X speed, for changing the tracking.
Your answer
Follow this Question
Related Questions
Stop 2D camera X axis movement if equal to one of two coordinates 1 Answer
2D Character Flip 2 Answers
Camerascript works strange! 0 Answers
2D camera rotating relatively to game object speed 0 Answers
Camera setup question 2 Answers