# 3D coordinates behind a camera

**URL:** <https://forum.kirupa.com/t/3d-coordinates-behind-a-camera/36320>\
**Category:** flash\
**Created:** [November 25, 2003, 2:17pm UTC](https://forum.kirupa.com/t/3d-coordinates-behind-a-camera/36320 "2003-11-25T14:17:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![YonkersDeluxe](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@YonkersDeluxe](https://forum.kirupa.com/u/YonkersDeluxe)\
**Post date:** [November 25, 2003, 2:17pm UTC](https://forum.kirupa.com/t/3d-coordinates-behind-a-camera/36320/1 "2003-11-25T14:17:49Z")

</div>

Hi,  
I’ve just been playing around with the 3D tutorials, thanks for  
that!

I just have a problem when a point goes _behind_ the camera:  
if point.z \< 0.  
It’s ok if there’s an MC that just becomes invisible - but if I try  
to draw a line to this point with the drawingAPI, the point’s screen  
x/y coordinates are weird.  
I can’t figure out how to modify the scaleRatio to get correct  
values.  
Here’s a code snippet:

var scaleRatio = focalLength/(focalLength + z);

```
screen_x = x * scaleRatio;
screen_y = y * scaleRatio;

```

Hope the problem is clear.

greets, Y
