Hey! In GMS2 3D, I want to create billboard rotation where an object will keep facing the camera. I have the position of the object, and the position of the camera, and I want to get the XYZ angle from the former to the latter. It will be used in a matrix to rotate a vertex buffer.
I have tried many different things but I fail. Getting the z angle is easy enough:
I am very new to 3D and bad at math, so please explain the things you mention, possibly with example code. Thanks!
I have tried many different things but I fail. Getting the z angle is easy enough:
Code:
camDirZ = point_direction(inst.x, inst.y, camX, camY);