From 672a0af081cf80b5f8d4ed3c5ea79be14480f3e1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 11 May 2020 11:45:20 +0200 Subject: Fix T76438: Wrong calculation of depth for Follow Track constraint Need to transform direction as such, without adding translation component of the camera matrix. --- source/blender/blenkernel/intern/constraint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/constraint.c') diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 7fe438c8c45..679fe703b13 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -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]; -- cgit v1.2.3