Forum

keep target camera inside the box

12 April 2017 08:41
hi~~!!

is there a way to prevent my target camera(panning mode used) to go outside of the area(selected cylinder in the pic below) without distance limitation?



12 April 2017 18:23
Hi!

Actually, this type of limitations is a quite tricky thing, as Target Camera presumes the freedom of motion as it is an overview camera.
I've played with such setup for a little while, and I must admit that it is almost impossible to make a stable physical block for the camera. You never know how quickly the user will move the camera.

Attaching the example. This is the best I was able to achieve. No floor and ceiling - they are even less stable. Also, I recommend turning off worker in the app.init method with physics_use_workers: false. This gives slightly better results.

So anyway, this approach is not production ready and I would recommend using camera limits if possible.
13 April 2017 04:42
Thank you for your help~!

I've tried that way too but always the camera goes out when i try to zoom out. haha..

hope to get some clue to solve it soon
 
Please register or log in to leave a reply.