E
E
Emil2021-06-04 00:31:11
C++ / C#
Emil, 2021-06-04 00:31:11

How to move the camera correctly in a 2D game, taking into account the height differences?

Greetings, there is a game where the camera moves when you click on the right side of the screen to the right, and vice versa when you click on a part. I can't catch up, how to move it, taking into account the height differences of the game world? I already even tried to hang a RigidBody2D with a collider on the camera, and imitate the rails on which it rides, but when I hang a rigidbody, any collider does not respond to pressing within the camera.
I will be very grateful for the answer.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question