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

What's the difference between Vector3 and Vector2?

Asked by
Kyokamii 133
9 years ago

I'm wondering, because I know they're different, but whats the difference? is there a Vector1?

0
Sorry for the 3 questions in a row, I ask a lot of questions. Kyokamii 133 — 9y

2 answers

Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

Vector2 is usually used for calculations that UDim2 cannot do. Vector 3 is used to position physical objects, such as Parts. Vector 2 has 2 parameters, X and Y, while Vector3 has 3, X,Y,Z. You can check the Wiki for more information.

Ad
Log in to vote
1
Answered by 9 years ago

I think Vector3 is louder than Vector2, because it has a lot of volume

get it? no? dangit

stupid pun Legit, what if it's 0,0,0? pretty sure that's mute.

shut up Legit you're killing it


Vector3 is 3 dimensional, hence VectorTHREE

Vector2 is 2 dimensional, hence VectorTWO

Vector3 is used for positioning parts, resizing them etc etc because parts are 3 dimensional.

Vector2 isn't used for anything major, it can be used to pass one argument in one instead, like how in my scaleToPixel and pixelToScale, I give Vector2 and it gives Vector2 back, it isn't used for UI stuffs either, since UDim2 is already in control for UIs


Vector1

A Vector1 data type would be useless, for it can only store one thing, either X, or Width.

Since it can only hold one number, that's the same as assigning a number to a variable. It would just make it more hefty for the Lua compiler to compile a Vector1 if it can be easily replaced by a number instead.

0
Vector2 is used for AbsoluteSize and AbsolutePosition in GUIs. BlueTaslem 18071 — 9y

Answer this question