I want to rotate an object towards something but I have little knowledge on whatever math is required to do it in CFrame. There is a simple way which is however said by the wiki to be deprecated where you use CFrame(object1, object2)
but now its recommended to use CFrame.fromMatrix. However, I don't know how to utilize CFrame.fromMatrix correctly.
I presume that LookVector will be used or a unit vector.
--example variables (aka probably use this in ur answer to help me) local object1 = workspace.Object1 local object2 = workspace.Object2
If you can answer, please explain any math behind it if you can! Should be easy to answer.
The wiki does say that it is deprecated, however you can use something similiar
object1.CFrame =CFrame.new(object1.Position,object2.Position)
to make object1 face towards object2's position.