Started by
RedWirePlatinum
on
Topic category: Feature requests and ideas for MCreator
This is something I think would be really useful in a future update, specifically it would help in determining what player is closest to an entity when iterating through all entities. But.. I for the life of me CANNOT figure out how to calculate the distance between two positions. What I want is kind of like how Vector3.Magnitude works in roblox https://create.roblox.com/docs/reference/engine/datatypes/Vector3#Magni…
Update: I know the formula now, for two positions it would be like this, using (x,y,z) and x2,y2,z2) as an example:
math.sqrt((x-x2)^2 + (y-y2)^2 + (z-z2)^2)
nb4 anyone calls me dumb or "you learned this in 9th grade" im forgetful ok >:(((((((
Thanks man, I didn't remember this formula ;)