Hey guys Its me again... Im trying to lerp a viewentity with camera.pan for realistic weaponaiming code. The viewentity is just created at runtime and will not set to camera position.
I tried this but it just change the postion when moving but when I stop moving, it doesnt go back to middle of screen. It just stays there Pleas ehelp me.
Re: Lerping viewentity with camera.pan
[Re: Ch40zzC0d3r]
#394138 02/10/1214:4302/10/1214:43
I do not understand what exactly you want to achieve. Could you please explain in more detail or do a quick picture?
Apart from that: lerping with the nullvector is pointless. The code above will set the entities pan angle to a value between 0 and 0.4 and it's tilt angle to a value between -0.2 and 0.2. The changes are so small you will hardly notice them.
Always learn from history, to be sure you make the same mistakes again...
Re: Lerping viewentity with camera.pan
[Re: Uhrwerk]
#394143 02/10/1215:2002/10/1215:20
Thank you. I just got it working now, but NOT with viewentities! I made a working camera to change weapon x,y,z but weapon is still in midle when turning charachter(changing pan, tilt, roll).