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

How to get a part's CFrame offset?

Asked by 6 years ago

With CFrame, in order to get a part to move in a certain direction based on it's rotation, I found that I can do CFrame(position)*CFrame(offset) but is there a way to get the offset of the part based on the original position?

1 answer

Log in to vote
1
Answered by 6 years ago

Assuming position, offset and newPosition are CFrame values:

position * offset = newPosition -- The formula you stated on your post

From that formula, we get:

offset = position:inverse() * newPosition
Ad

Answer this question