CFrame lookat without Y axis orientation?

can you use cframe.lookat without it needing to affect the Y axis to orient it? there are pictures below that explain my issue better, the yellow part is the point the object is facing, the first image shows how lookat currently works,the second shows how i want it to behave


1 Like

I basically want to loosely preserve the object’s original Y orientation but still get the effect of it visually shifting to tilt away from the point, as if it were looking at it but not shifting around the Y axis of orientation, if i try to simply remove the Y axis it causes tons of issues due to it needing the Y axis to look directly at the point.

Nevermind! i figured it out! i can simply multiply my lookat cframe by a cframe with the rotations 0,-Y,0, where Y is the Y axis orientation of the lookat cframe!! i hope this helps someone else cuz i couldnt find a post anywhere about this simple issue

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