1. A method in connection with off-line programming of an industrial robot, comprising teaching the robot a path having a number of waypoints located on or in the vicinity of at least one object to be processed by the robot, the method comprising: obtaining information about the position of a part of a body of an operator pointing by said part at a point on or in the vicinity of the object, determining the position of the point being presently pointed at by said part of the body, in relation to the object, based upon said obtained information, generating a visual feed-back to the operator of the position of the point being presently pointed at by said part of the body in relation to the object, storing the position of said point being presently pointed at by said part of the body as a waypoint upon receiving a recording command, and generating robot programming code based upon the stored waypoint.