Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No movement on Click & Drag #5

Open
AtlasTabula opened this issue Aug 27, 2022 · 0 comments
Open

No movement on Click & Drag #5

AtlasTabula opened this issue Aug 27, 2022 · 0 comments

Comments

@AtlasTabula
Copy link

Hi, just downloaded this and put it in my project, it seems to be exactly what I'm looking for but I can't for the life of me get the click & drag to work at all.
I have no touch screen so I can't test that.

The issue seems to be with the line:
cam.transform.position -= (cam.ScreenToWorldPoint(deltaPosition) - cam.ScreenToWorldPoint(Vector2.zero));
which only ever returns the camera's default position for me, and I can't seem to get it working.

What exactly am I doing wrong here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant