not sure if this is around or has been done, but trying to find out, what is the best way for a top down, to stop the camera and player when it reaches the background or border of a collision? so the camera stops, but the player is able to still move until it also reaches the border of the screen… I do see a couple tutorials online for platformers, but nothing for top down that i have found… any idea?
would I use maybe collision? or should i use rigid body 2d? any good example tutorials or sample code?
thank you for the tutorial, however for this tutorial, I like it, and would sorta work, however for my game, i dont want it to bound by the screen width/height, but I want the camera to move until it comes to the end of the background… see picture, hopefully this helps a little…
the weird thing is, the collision doesnt work, when the camera that has a box collider 2d and the floor box collider 2d touch, i never see a “Collision”, i put a debug.log to check and never happens, see code below and screen shot
sorry yes, So finally got it to work, which had to add RigidBody2d… but also, now that i add it, when one object collides with player object/character… it bounces around, the only way I can stop it from doing that… is on the rigid body2d, under Constraints… freeze position x, y and z… now it sorta works the way I want it… but is this the right choice of action? or is there a better way?