/apps/tools/twndel: camera translation
This commit is contained in:
@ -531,8 +531,8 @@ DrawCameraUnprojectResult draw_camera_unproject(Vec2 point,
|
||||
|
||||
/* simpler case, just shoot a point from viewbox face along the supplied direction */
|
||||
if (orthographic) {
|
||||
Vec3 right = vec3_cross(direction, up);
|
||||
Vec3 aup = vec3_cross(direction, right);
|
||||
Vec3 right = vec3_norm(vec3_cross(direction, up));
|
||||
Vec3 aup = vec3_norm(vec3_cross(direction, right));
|
||||
return (DrawCameraUnprojectResult){
|
||||
.direction = direction,
|
||||
.position = vec3_add(vec3_add(position, vec3_scale(right, v.x * aspect/zoom)), vec3_scale(aup, -v.y * aspect/zoom)),
|
||||
|
Reference in New Issue
Block a user