The advances in cell imaging technology has allowed for deeper understanding of the movement mechanisms of immune cells. Experimental evidence suggests that cytotoxic T lymphocytes and dendritic cells undergo and unrestricted search motion until they switch to a more restricted motion induced by activation by tumour antigens. This change in movement is not often considered in the existing mathematical models of the interactions between immune cells and cancer cells. We present a spatially structured individual-based model of tumour-immune competition that takes explicitly into account the difference in movement between inactive and activated immune cells, using Lévy walks and Brownian motion to capture this motion, respectively. The effects of activation of immune cells, the proliferation of cancer cells and the immune destruction of cancer cells are also included in the model. We illustrate the ability of our model to reproduce qualitatively the spatial trajectories of immune cells observed in experimental data of single cell tracking. Computational simulations of our model further clarify the conditions for the onset of a successful immune action against cancer cells and suggest possible targets to improve the efficacy of cancer immunotherapy. Overall, our theoretical work highlights the importance of taking into account spatial interactions when modelling the immune response to cancer cells.