World position to offset?

  1. What do you want to achieve?

I want to get offset from world position.

ofsett

If I understand you correctly you want the position relative to the part?

position - part.Position

otherwise the offset relative to the world is the position.

In Vector Math this is very simple, you can get an offset by subtracting the world position by the point you want the offset of.

I think of it like a number line

if you want the offset of 9 from 5 you would do 5 - 9 (giving -3)
from 0 to -3 is the same as from 9 to 5

this works the same way with two and three dimensional vector math

image
image

edit: if you want cframes it’s slightly different due to cframe math but still is the same concept,
p2.CFrame:Inverse() * p1.CFrame

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.