camera_world_to_pixel_point now also takes camera fov into account
This commit is contained in:
parent
62410b7d72
commit
ac24521b34
|
@ -40,5 +40,7 @@ Vector camera_world_to_pixel_point(Camera* self, Vector point) {
|
|||
t.scale = OneVector;
|
||||
t = transform_invert(t);
|
||||
|
||||
point = (Vector){point.x + (self->fov / 2.0), point.y + (_camera_height(self) / 2.0)};
|
||||
|
||||
return vmulff(transform_point(&t, point), g_render_resolution.x / self->fov);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue