Camera Zoom in Turret View
-
Here’s the latest version - after seeing what Freeworlds does, you can now move up/down, as well. It’s still not as smooth as FW, though. I’ve included a readme, this time, too.
-
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
-
I find it kind of amusing at how similar the code I hacked out looks to that….
not surprising I guess.
-
thx for the updates, and for the code delivery
It will work fine with the last zip
And with the code it is easier to try to learn how to do that…Thx
-
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.
-
If it works on Windows 7 64, I guess it would be safe to assume it works everywhere, and I can remove the patched-in value. I might use it more often, too…
-
Yet it works on 7 64bit .
I had 1.4.0 but with the 1.4.1 works good .
Its kinda confusing with those versions released so fast, even i checked the website adoxa.110 -
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?
-
Fraps sees what you see, so it should.