How to rotate an object according to the camera's view?
Basically, my goal is this: I want a script I can attach to an object that rotates it according to the camera's view. As in, if a cube with the script attached is in front of the camera, and I press W, it rotates upward so that according to the camera, the cube face that was facing the camera is now facing north, the cube face that was facing south is now facing the camera, etc. I've been able to almost do this using quaternion.angleAxis and then lerping, but it rotates the object according to its own orientation, not the cameras, and that leaves the rotation feeling random as it does not act like I described above. I would very much appreciate any help! Thanks.
Answer by Steven912 · Aug 19, 2018 at 09:04 PM
I created a picture of what I mean.