Fix T76438: Wrong calculation of depth for Follow Track constraint

Need to transform direction as such, without adding translation component
of the camera matrix.
This commit is contained in:
Sergey Sharybin 2020-05-11 11:45:20 +02:00
parent 38732c74fc
commit 672a0af081
Notes: blender-bot 2023-02-14 07:25:46 +01:00
Referenced by issue #76438, Follow Track constraint for 2D Track points depends on global coordinates regardless of parenting
1 changed files with 1 additions and 1 deletions

View File

@ -4821,7 +4821,7 @@ static float followtrack_distance_from_viewplane_get(FollowTrackContext *context
/* Direction of camera's local Z axis in the world space. */
float camera_axis[3];
mul_v3_m4v3(camera_axis, camera_matrix, z_axis);
mul_v3_mat3_m4v3(camera_axis, camera_matrix, z_axis);
/* Distance to projection plane. */
float vec[3];