Point between the two positions
#1

Hi!

Someone have idea that can be calculated between the two points of coordinates?



I would like get 3. coordinates.
Reply
#2

If it's exactly in the middle:
(x1 + x2) / 2 = (-121.1 + -2071.3) / 2 = -2192.4 / 2 = -1096.2
(y1 + y2) / 2 = (3583.52 + 1603.2) / 2 = 5186.72 / 2 = 2593.36
(z1 + z2) / 2 = (16.1 + 49.5) / 2 = 65.6 / 2 = 32.8

Just take the average of both coordinates.
Reply
#3

I recommend:
PHP код:
GetPointFor2Point2D(Float:x1,Float:y1,Float:x2,Float:y2,Float:percent_size,&Float:tx,&Float:ty);
GetPointFor2Point3D(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2,Float:percent_size,&Float:tx,&Float:ty,&Float:tz); 
Point 1-> aims Point 2
percent_size // 0.0 - 100.0

https://github.com/AbyssMorgan/SA-MP...SAM/3DTryg.inc
Reply
#4

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)