I’m using Rendercam from the Asset Store and I don’t know how to zoom the rendercam
Use rendercam.zoom
https://github.com/rgrams/rendercam#rendercamzoomz-cam_id
1 Like
@anon64925349 Could you show the complete code?
So, I tried to do what was written and it didn’t work
Definitely, I will try to leave in the code only what you really need.
local rendercam = require "rendercam.rendercam"
function init(self)
msg.post(".", "acquire_input_focus")
zoom = 1
rendercam.zoom(100)
end
function on_input(self, action_id, action)
if action_id == hash("up") and zoom < 1 then
rendercam.zoom(-15)
zoom = zoom + 1
elseif action_id == hash("down") and zoom > - 10 then
rendercam.zoom(15)
zoom = zoom - 1
end
end
By the way, I also have a program for monitoring the game object with a camera only if it is between certain positions, so that the player cannot leave the map and at the same time the map has no visible end. If you want the whole code, just say so.