Allow us to position parts relative to a different origin

It would be nice if we had a property which was a member of model that allowed us to position parts relatively to the model. This property would be a CFrame value called Origin.

The default value would be CFrame.new() which means that all current levels would be unaffected by this property. If that origin was changed then all descendants of the model would be positioned relative to the new origin.

This feature would be useful as it would help resolve many of the issues that arise from floating point precision but would also allow us to avoid doing calculations that could be costly on large scale models if it was optimized correctly.

For example, you could build a sliding door and then just change the origin of the model to move the entire door. You could build an entire map for a game and not have to worry about storing the map in the correct position and instead just changing the origin of the map to applicable position.

Overtime this could be optimized in order to allow much larger places and perhaps even lead into multiple workspaces in the future.

This would also fix the problem mentioned here :SetPrimaryPartCFrame() gradually offsets component parts

1 Like

How is this different from modelCenterPart.CFrame:toObjectSpace(otherPart.CFrame)? For instance:

local doorSystem = script.Parent
doorSystem.PrimaryPart = SOME_CENTER_PART
--
local door = doorSystem.Door
door.PrimaryPart = door.BLAH
--
local origin = doorSystem:GetPrimaryPartCFrame():toObjectSpace(door:GetPrimaryPartCFrame())
2 Likes