The problem is in fact the transformed centers of the objects, they're always reading (0,0,0) :!: Why would this be? The objects are in the right positions in the rendered scene. It's probably a timing issue. When should I be calling the code to calculate the distance?