2D Sample Camera Script malfunctioning
Hi, I'm trying to use the built in assets sample 2D camera that follows a player object, I've put an object into the game world that's controlled with a player controlling script for simple movement, it works fine.
The camera however will not follow it unless I specify min and max x & y values on the follow script. However, if I specify MIN values the camera jumps to whatever I set them to, instead of staying with the player, as soon as I start the scene. Since I can't set a minimum, if the player falls, the camera will always stop following after 0, which is not what I want. And if I don't start the player object AT 0, 0 then for the camera won't be on them to begin with, and will only follow them to the maximums, which is again, not what I want and doesn't appear to be the intended purpose of the script.
In addition the movement of the camera is incredibly jerky, regardless of what I set the smoothing values to. I've tried moving the Update section into FixedUpdate and removing the time.deltaTime but that's has no discernible effect on the cameras behaviour, it's still incredibly jerk, with only 2 objects on the screen there's no reason for this.
Can someone help me identify what's going wrong? I've looked through the script and cannot find the error, and I'd suspect that a publicly released item like this wouldn't fall through the cracks with such significant errors. The only modification I've made to the script is the change from Update to FixedUpdate, everything else is entirely stock.
Public values have the X & Y margins set to 1, smoothing set to 10, arbitrarily as any value produces the same result, I've tried 0 - 100 in increments of 1 until I reached pretty higher numbers at which point I switched to 5. Max X & Y are currently set to 10, with minimums set to 0, because of above behaviour.
Really hoping someone can help me on this, thanks!
Your answer
Follow this Question
Related Questions
How to stop the camera when the player has reached the edge of the level? 2 Answers
How to set Camera Limits in Unity that would stay accurate for different screen ratios? 2 Answers
Camera not following 2D character when the character reaches the ground. 0 Answers
Create a smooth camera without jittering/flickering in 2D 3 Answers
C# Smooth Follow Space Ship 1 Answer