logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

s3d_angle_to_cam - calculate angle between vector and cam

Author

SimonWunderlich
           Author of s3d

s3d                                                                                          S3D_ANGLE_TO_CAM(3)

Description

       Given obj_pos and cam_pos in the format float[3], angle_rad about which angle the object should be
       rotated around the y-axis so that it faces the camera. This might become handy if you have some text
       floating in space and want it to face the camera. http://en.wikipedia.org/wiki/Vector_(spatial)

Name

       s3d_angle_to_cam - calculate angle between vector and cam

Synopsis

#include<s3d.h>floats3d_angle_to_cam(constfloatobj_pos[],constfloatcam_pos[],float*angle_rad);

See Also