Camera Zoom in Turret View
-
Well, here is the turret zoom code of Freeworlds if you’d like to integrate it (this is called on rendering any frame):
bool bReloadTurretView; float fTurretViewMulti = 1.0; float fTurretViewTargetMulti = 1.0; float fTurretCameraOffset[3] = {0, 0, 0}; void TurretZoom(CAM_DATA* camera_setup, float fInterval) { // special turret cam zoom if(bReloadTurretView) { // load turret offset data fTurretCameraOffset[0] = camera_setup->fCameraOffset[0]; fTurretCameraOffset[1] = camera_setup->fCameraOffset[1]; fTurretCameraOffset[2] = camera_setup->fCameraOffset[2]; // reset multiplier fTurretViewMulti = 1.0; fTurretViewTargetMulti = 1.0; bReloadTurretView = false; } float fMultiDiff = fTurretViewTargetMulti - fTurretViewMulti; fTurretViewMulti += fMultiDiff * fInterval* (float)2.5; camera_setup->fCameraOffset[0] = fTurretCameraOffset[0]*fTurretViewMulti; camera_setup->fCameraOffset[1] = fTurretCameraOffset[1]*fTurretViewMulti; camera_setup->fCameraOffset[2] = fTurretCameraOffset[2]*fTurretViewMulti; }
And in the input hook:
case USER_WHEEL: { // up or down? int* iMWheelFlag; iMWheelFlag = (int*)0x061684C; if(*iMWheelFlag < 0) // up { fTurretViewTargetMulti *= (float)1.1;
and so on
-
The server hosting my site finally got some free space, so here’s the latest version, incorporating the render update (where I use the camera’s accel_speed, rather than 2.5) and processing options (at least, it processes options for me, there’s a chance it might not work for anyone else).
-
Adoxa , the options from arguments do not work on windows 7 64 bit.
On windows xp works normal .
I have```
TurretZoom.dll max=6500000 large=1.2All other features like zooming in and out works nomal . Edit : my mistake , i didn`t had latest version.
-
Good work adoxa for this one
It will be in the next UnderVerse release. I limited the range to 20 k so it couldn’t be used as an exploit at our ‘Beat the Bomb’ event. What it will be used for is all of our fighter events so people on the sidelines can see more of the fighters than just specs moving around.
-
Good deal there, Dwn, as always. Will it work while taking a video then?