Go to the Effects and Preset panel and search for 3D Camera Tracker.
Drag this effect onto the moving image layer in your composition.
Once applied to layer, wait for the display to say that the footage is being analysed and then camera solving. This may take a while as the software is analysing every frame of the footage.
Once complete, you see numerous coloured Xs (track points) over your image, which move with the motion of the footage as you scrub through the timeline.
Make sure View > Show Layer Controls is on.
You can right click on an individual tracking point or highlight multiple points and right click for options on what to attach to that point.
If you select 'Create Text and Camera' these objects are created with a new layer each in your composition.
You can adjust the text layer as you would normally to change the lettering and re-scale.
To see what is happening in 3D space, we need to change the view from 1 to 2 (with the above view).
As you playback through footage the text should appear to 'stick' to the castle wall.....
Written by LA