PDA

View Full Version : Moving object in parabola


NeamPojma
08/07/2017, 08:28 PM
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.

AbyssMorgan
09/07/2017, 01:22 PM
You need generate points for arc 3D

bool:GetArcPoints3D(Float:x,Float:y,Float:z,Float: tx,Float:ty,Float:tz,Float:ry,Float:height,Float:p oints[][],max_points = sizeof(points));

3DTryg.inc:
http://forum.sa-mp.com/showthread.php?t=591010

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

NeamPojma
09/07/2017, 02:14 PM
Hmm can you explain parameters?

AbyssMorgan
09/07/2017, 02:28 PM
bool:GetArcPoints3D(Float:x,Float:y,Float:z,Float: tx,Float:ty,Float:tz,Float:ry,Float:height,Float:p oints[][],max_points = sizeof(points));

x,y,z - 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

http://i.imgur.com/SdqyUqV.png