SA-MP Forums Archive
Rotation Camera with Interpolate Function - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Rotation Camera with Interpolate Function (/showthread.php?tid=412726)



Rotation Camera with Interpolate Function - Admigo - 02.02.2013

Hi all,

Is it possible to make a rotation function with the interpolate camera function for rotation the camera arround a point?
How can this be made?

Thanks,
Admigo


Re: Rotation Camera with Interpolate Function - Vince - 02.02.2013

I don't think so. The camera only goes straight. Maybe if you use some kind of polygon structure with 4, 8, 16, .. corners it might work. Can't really tell.




Re: Rotation Camera with Interpolate Function - Admigo - 02.02.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
I don't think so. The camera only goes straight. Maybe if you use some kind of polygon structure with 4, 8, 16, .. corners it might work. Can't really tell.

So you need to move the camera pos to the corners and let the camera look at the point right?
Can i make this without timer?


Re: Rotation Camera with Interpolate Function - Bakr - 02.02.2013

You could, but it would honestly take less work to just manually move it along specified points. Otherwise, you would need to call timed functions after each completed step of the interpolate.

EDIT: There is at least one filterscript/include released that adds this functionality. Search for it.


Re: Rotation Camera with Interpolate Function - spedico - 02.02.2013

InterpolateCameraPos(playerid, Float:FromX, Float:FromY, Float:FromZ, Float:ToX, Float:ToY, Float:ToZ, time, cut = CAMERA_CUT)

Set the time to 5000 (5 seconds) for example, then set a timer that runs in 5 seconds, that changes the coordinates to next corner and repeat till you have gone around the object? Kinda tricky and probably won't look smooth, but should work.

Would that work?

edit: 3 posts while I was writing this, zzz.
edit2: https://sampforum.blast.hk/showthread.php?tid=291910


Re: Rotation Camera with Interpolate Function - MP2 - 02.02.2013

This can't really work because the interpolation starts off slowly, speeds up, then slows down toward the end, so start/end 'smoothly'. If you interpolate again, the camera will stop and slowly gain speed.