I have a game that is ready to publish by the weekend. But I tested it out on an Android tablet and everytime an NPC makes contact with a player, the player's ZoomDistance zooms way in, almost to first person view. It doesn't autozoom like that for me on PC, so I didn't realize that this was an issue until now.

This auto zoom setting makes it very difficult to survive when an NPC touches you, because you can no longer see where it's safe to run to on the map. I imagine that this is probably an issue for a lot of developers trying to build action based games, but I haven't found any solutions for this online.

I tried disabling this auto zoom feature by using

player.CameraMinZoomDistance = 12.8

And the above code seemed to help, as it appears to auto zoom less often than it did before. And when it does autozoom and the player gets away from the NPCs, it zooms back to 12.8 which is good.

But I would really prefer to disable this auto zoom altogether. Also, setting CameraMinZoomDistance disables players from zooming in if they want to, and I would really prefer not to have to disable that option for them.

I noticed that a lot of developers on here have had issues with the Camera changing on them with vehicles, but the solutions seem to only apply to camera settings when in vehicles.

Is there a way to disable this auto zoom setting?

4 comments

0

Hi Phlegethon5778, yes this is helpful as it's leading me in the right direction. The post you linked to though is about changing player transparency and doesn't seem to be about preventing auto zoom. Still, I do thank you for the link as it's helping me to figure out how to fix this with the StarterPlayerScripts->CameraScript

0

I was not referring to the transparency. I wanted you to see that you could change the base scripts. I don't know much beyond that though. Glad I could point you in somewhat the right direction.

0

Yes thank you for showing me that I can change the camera scripts in StarterPlayerScripts. It's putting me in the right direction. There's so many lines of code though I'm not even sure where to begin. But at least I have a sense of where to look now so ty.