-
Element 3D / How to make 3D Objects disappear behind element layers?
Hi! I was wondering if anyone had a solution for making other 3D object disappear behind and Element 3D model. LIke words going around a planet. The solution I have uses the camera’s depth for individual objects, which is fine, but if I move the element object or camera the code breaks. Any help is greatly appreciated! Oh, the code came from the Fabien the Blind. =
cam = thisComp.layer("Camera 1");
camPos = cam.toWorld(cam.position);
target = thisComp.layer("marker");
targetPos = target.transform.position;
dist = length(camPos, targetPos);
// str = "point distance to camn" + dist;
visMax = 2410;
if(dist > visMax){
0
}else{
100}