The title pretty much says it all. Wondering if I can convert a distance obtained in studs into a vector 3 value.
1 Like
Yes, you can and to do this you need to figure out along which axis you want to apply the distance. I will provide a script you can modify
local distanceInStuds = 10 -- Replace this with your distance value ( if you have one)
-- Convert distance to Vector3 along the X axis
local vector3Value = Vector3.new(distanceInStuds, 0, 0)
print(vector3Value)
2 Likes
You can subtract 2 vectors and getting its Magnitude property.
(from - to).Magnitude
where from and to are both Vector3.
1 Like
Ah okay, that was a lot simpler than I thought, lol! Thanks for the help.
1 Like
Your welcome! Iām happy I could help you.
2 Likes