I have written this code to find the ball entity but I can’t figure out how to get its position. I plan to use the lookAt function with this information.
var CameraFollow = pc.createScript('cameraFollow');
CameraFollow.attributes.add('VolleyBallEntity', {type : 'entity'});
const position = //?;
CameraFollow.prototype.update = function(dt) {
this.entity.lookAt(position);
};