How to make bottom of a part face a certain direction

How would you make a part’s bottom face a direction. Not the front but the bottom of the part. I know you can do CFrame.new(position, lookAt) But how do I do that with a different direction thats not the front.

2 Likes

You can make adjustments to the CFrame.lookAt(position, lookAt) to reverse it as one knows it is guranteed most of the time to make the front face a part.

*These are for making the back of a part face a direction

One method should be to rotate it 180 degrees local y axis.

CFrame.new(position, lookAt) *CFrame.Angles(0,math.rad(180),0)

Another method be to inverse the rotation, making the orientation look in the opposite direction.

CFrame.new(position, lookAt).Rotation:Inverse()+position

You can even make it look backwards at a point, by making the direction vector from the position to the look at point negative:

local positionToLookAtVector = lookAt - position
local positionToLookAtBehind = position - positionToLookAt 
CFrame.new(position, positionToLookAtBehind) 

*Whoops I misread it, it’s the part bottom for that I believe it’s easier to just rotate it 90 degrees along the x axis.

CFrame.new(position, lookAt) *CFrame.Angles(math.rad(90),0,0)

But the gist of it is modifying the obtained CFrame after knowing the fact the front faces the direction.

4 Likes