3D coordinates behind a camera

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

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
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