SA-MP Forums Archive
Moving object in parabola - 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: Moving object in parabola (/showthread.php?tid=637104)



Moving object in parabola - NeamPojma - 08.07.2017

Hello as title says how could i make object move in parabola (to look realistic)?
I have starting X,Y,Z and ending X,Y,Z and i guess MoveObject velocity.


Re: Moving object in parabola - AbyssMorgan - 09.07.2017

You need generate points for arc 3D
PHP код:
bool:GetArcPoints3D(Float:x,Float:y,Float:z,Float:tx,Float:ty,Float:tz,Float:ry,Float:height,Float:points[][],max_points sizeof(points)); 
3DTryg.inc:
https://sampforum.blast.hk/showthread.php?tid=591010

Video:
https://www.youtube.com/watch?v=lYS-ryk7n4E


Re: Moving object in parabola - NeamPojma - 09.07.2017

Hmm can you explain parameters?


Re: Moving object in parabola - AbyssMorgan - 09.07.2017

PHP код:
bool:GetArcPoints3D(Float:x,Float:y,Float:z,Float:tx,Float:ty,Float:tz,Float:ry,Float:height,Float:points[][],max_points sizeof(points));

x,y,start position
tx
,ty,tz end position

ry 
roll arc (default 0.0 the arch point rises upwards)

height maximum radius of arc

Float
:points[][] - arc points
first
x,y,z
last
tx,ty,tz

minimum max_points is 3