Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Need help placing billboard gui between multiple parts?

Asked by 6 years ago

so i wanna make billboard gui be placed in middle of 3 items on a sandbox game can i get any help?

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Do simple math for example :-

if the part 1's position is = 1331, -379.5, 3398 and part 3's position is = 1331, -379.5, 3389 place the part 2 is the position = 1331, -379.5, 3389

Here my part's X,Y position is same i just changed Z position

Here the part 2's Z position is :-

{ (Part 1's Z position) - (Part 3's Z position) / 2 }

In case you are changing all of the positions then to set part 2 in middle set the part 2's position

X = [ (Part 3's X position ) + { (Part 1's X position) - (Part 3's X position) / 2 } ]

Y = [ (Part 3's Y position ) + { (Part 1's Y position) - (Part 3's Y position) / 2 } ]

Z = [ (Part 3's Z position ) + { (Part 1's Z position) - (Part 3's Z position) / 2 } ]

Only apply this math in the different position between Part 1 and Part 3

0
but i dotn know how many items are selected u can select up to 99 Benjamin_pro1000 3 — 6y
0
If you select 99 then the math will be too big and unsolvable, you need to compare every 2 nearby parts and get middle position of them then compare every 2 nearby middle position and get middle position of them, do it until you get only 1 position, This type of 3D math would be super hard even if you are using calculator.And if you make it in script you need to make a too big mathematical script, TheSkyofIndia 150 — 6y
Ad

Answer this question