Hello!
I’m currently making a game that allows you to chop a tree in sections (Similar to Lumber Tycoon 2’s system). It’s going great, but I’ve run into a small problem.
When I create two halves, I do math using the y axis to reposition them. Here’s the code:
((originalObject.Size / 2) + originalObject.Position.Y)
(For the top half ^)
((originalObject.Size / 2) - originalObject.Position.Y)
(For the bottom half ^)
This works wonderfully until I get into other directions. If the log is lying sideways on the ground they will stack on top of each other as the Y direction is in world space.
How would I go about changing this to add in object space? I’ve experimented with CFrame:ToObjectSpace() But I can’t wrap my head around the math of that.
Thanks!