Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Difference between CFrame and Vector3?

Asked by 6 days ago

Hello, I have some decent experience in coding but I keep stumbling upon whether to use CFrame and Vector3. Most of the time, I know which to use but I never properly understood what the two really are and how they're different. Is CFrame responsible for orientation and location? Is Vector3 responsible for just position? If someone could clarify this it would be great. Thank you! -cooldeath49

0
-cooldeath49 Elixcore 453 — 6d
0
Question was already asked by another person, lots of great answers here: https://devforum.roblox.com/t/whats-the-difference-between-vector3-and-cframe/235522 BuDeep 19 — 6d
1
The main difference is that Vector3 is a position and CFrame is a position and rotation. pidgey 443 — 6d
0
just remember that cframe is cursive vector3 Fifkee 886 — 6d

1 answer

Log in to vote
0
Answered by 6 days ago

A CFrame is a specific point in the Workspace, that will not change throughout the game, whereas a Vector is a position relative to where the object already is. EG. Imagine that vectors and CFrames only had two arguments, X and Y, and your at position (1,1).If you move by a vector (2,2), you would end up at (3,3), whereas if you were to use a CFrame, it's like jumping straight to a specific place, EG. Your at (1,1) and you move by CFrame (4,4), you would end up at (4,4).

0
no?? SinisterMemories 864 — 6d
0
my brain just fell out of my mouth reading this Fifkee 886 — 6d
0
I think you got the Vectors and CFrames mixed up, according to the link provided by BuDeep in my question it says CFrame is a positioning system for local axes and vector is a positioning system for world axes cooldeath49 32 — 6d
Ad

Answer this question