what determine's the direction that Halley's comet points?

The tail points away from the sun.

The direction in which Halley's comet points, specifically the tail, is determined by the interaction between the comet and the solar wind. The solar wind consists of charged particles and magnetic fields that are constantly emitted by the Sun.

When Halley's comet approaches the Sun in its orbit, the intense heat causes the icy nucleus of the comet to turn into gas, releasing particles and creating a glowing coma around the nucleus. The solar wind, which constantly streams from the Sun in all directions, pushes on the gas and dust particles in the coma, creating a force that pushes the material away from the Sun. This force is called the solar radiation pressure.

As a result of this solar radiation pressure, the coma and the tail of Halley's comet always point away from the Sun. The comet's nucleus and coma act as a sort of "sail," and the solar wind acts as a "wind" blowing against it, causing the tail to stream away in the opposite direction.

It's important to note that the direction of the Sun is not the only factor influencing the orientation of the tail. The shape and orientation of the tail can also be affected by other forces, such as the comet's rotation and any gravitational interactions it may have with other celestial bodies as it passes by them in its orbit. However, the solar radiation pressure is the primary factor that determines the general direction in which the tail points.