Skip to main content
9 events
when toggle format what by license comment
Oct 11, 2017 at 20:44 comment added MattMatt2000 @Bram Thanks :3 It's exactly what I've been looking for!
Oct 11, 2017 at 20:43 vote accept MattMatt2000
Oct 11, 2017 at 17:52 history edited Bram CC BY-SA 3.0
Follow DMGregory's excellent advice.
Oct 11, 2017 at 17:46 comment added DMGregory You might want the arcsine of forward.z instead — this handles the sign naturally without an extra dot product checking step.
Oct 11, 2017 at 17:13 history edited Bram CC BY-SA 3.0
Oops, one more try. Tilt is harder than yaw.
Oct 11, 2017 at 17:05 comment added Bram Thank you @DMGregory, I forgot about tilt. Answer adapted to calculate both yaw and tilt.
Oct 11, 2017 at 17:03 history edited Bram CC BY-SA 3.0
Address comment by DMGregory about camera tilt.
Oct 11, 2017 at 16:53 comment added DMGregory Remember OP is looking for two angles: a yaw and a pitch. They need two slightly different techniques. Don't forget to describe what you mean by lookat too — in some contexts this is used to mean a worldspace point the camera should look towards, but in your example above it looks like you mean it to be the camera's forward direction vector or the offset from the camera position to a point in the center of the camera's view some distance away.
Oct 11, 2017 at 16:49 history answered Bram CC BY-SA 3.0