Help! Unity changing the Z axis / Zoom

Kaorin333

Solid & Active Platinian
Original poster
Jun 11, 2022
89
9
8
34
Germany
Hello my dears,

does anyone know maybe a good method or has an idea to change the height of the camera for unity games.

I was trying to hook and change the UnityEngine.Core.Camera class but it is crashing the game, maybe because i didnt took the correct camera instance or did maybe soemthing else wrong.
But anyways is there maybe a more universal approach for unity games?

would be nice if you could let me know.
 

·҉ dollaz·҉. .

Approved iModder
Approved iModder
Mar 26, 2021
159
1,817
193
Somewhere
You can try setting a function pointer get_main in the UnityEngine.Camera class and get its transform and set its position position depending on what you want. Im sure height goes along the Y axis, so if you wanted to make a slider you would do:
C++:
float YAxis;

setPosition(cam, Vector3(cam.x, cam.y = YAxis, cam.z));
this is an extremely simplified version because I didnt include the pointers, or setPosition function. If you need it let me know
 
Last edited:
  • Like
Reactions: Kaorin333