Hello everyone.
I am having wired behavior with Cinemachine2D.
I have following code in my Update() Loop:
private void Update()
{
if (Input.GetMouseButtonDown(0))
{
Debug.Log(Input.mousePosition);
}
}
I am using Cinemachine2D and on start it does follow a GameObject and it works just fine. The values look good. (Bottom left of the screen shows (0.4, 6.0, 0.0) for example)
Once I change the Following Target (another Game-Object at the same Position as the previous Object) it suddenly shows totally different values (-2897.9, -1014.0, 0.0) also on the left bottom corner.
Of course that messes up all my ray casts to see if one objects has been touched…
Can anyone explain me why and how I can solve the problem, because I need to change the following target dynamically?
Thank you very much and best regards,
Luke