Make Top of CFrame look at another on one axis

I’d like to make the top of a CFrame look at another, but I’d also like to make it only rotate on one axis too, I’m trying to make a flight effect and I’m not sure how to tackle this.

The red part will constantly have the same rotation as the camera, but id like the top to look at the blue part, which is offsetted based off the direction my player is moving, only on the Z axis

Something like this.

I believe you can pass an additional up vector to the CFrame.LookAt() function to achieve this.

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