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

Difference between these CFrame methods?

Asked by 9 years ago

I'm confused, what would be the difference between these two?

Part.CFrame = Part.CFrame * CFrame.new(0, 5, 0)

Part.CFrame = CFrame.new(0,5,0):toObjectSpace(Part.CFrame)-- Not sure if I positioned these values right, recently learned toObject and toWorld space, but to me these to seem to do the same thing, your just adding onto the previous value right?

1 answer

Log in to vote
2
Answered by
ImageLabel 1541 Moderation Voter
9 years ago

toObjectSpacelet's you know where something is in relation to something else. For instance, if you had too parts (Part1, Part2). It would allow you to figure out just where Part2 is relative to Part1, if the XYZ axii was "centered" at Part1, including rotation.

more on CFrame's member functions here, and here

0
ok, I see thankyou dragonkeeper467 453 — 9y
Ad

Answer this question