I am working on a top-down shoot-em-up in which the player object needs to remain pointing at the cursor. Thus far I have had a mode in which the player is always at the center of the screen, and everything works as expected when using the “Find Look at Rotation” function. But after entering another mode in which the camera is not centered on the player, it gets totally messed up. Moving the cursor now has a minimal effect on the rotation, varying by a small amount in either direction, which increases as the player gets closer to the point directly below the camera.
I can only conclude from this that “Find Look at Rotation” is somehow affected by the location of the camera. But this doesn’t make any sense to me; it’s supposed to just give a rotation to orient an object at the start position toward the target position. It should be fully possible to do that calculation independently of the camera. It should be possible to do without any camera at all, shouldn’t it?
Does anybody know what is going on here, and how I can make it work as expected?