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

What the difference between Vector3 and CFrame?

Asked by 9 years ago

So basically I been using CFrame and then I came across Vector3. I wanted to know what the Difference between them and the advantage and disadvantage between these two.I would be **grateful **if you could answer my question .

1 answer

Log in to vote
1
Answered by 9 years ago

CFrame includes rotation; Vector3 does not. Setting a part's CFrame will allow it to be clipped through other parts. Setting a part's position will put it on top of anything it collides with.

CFrame is essentially Vector3 with a rotation matrix, and also can be used like this:

CFrame.new(Vector3) -- creates a CFrame at Vector3 with no rotation
CFrame.new(Vector3,Vector3) -- creates a CFrame at the first Vector3 whose rotation is towards the second Vector3
Ad

Answer this question