you could do
however, something like this is best done with a physics engine
if entityinview(camera, entity) and entitydistance(camera, entity) < 1 and keyhit(57) then entityparent entity, camera
however, something like this is best done with a physics engine