It sounds most like my traveling path sample:
https://forge.autodesk.com/blog/move-viewers-camera-along-drawing-travelwalking-paths-forge-viewer
To use the location data, you can pass them to the _createLineMesh function like the below
const ext = await viewer.loadExtension( 'Autodesk.ADN.WalkingPathToolExtension' );
ext._createLineMesh( locations );
To check if you hit walls, you could try to do ray casting from the camera position and along the sight direction in the first-person mode when moving the camera.
viewer.addEventListener(
Autodesk.Viewing.CAMERA_CHANGE_EVENT,
( camera ) => {
const ray = new THREE.Ray( viewer.navigation.getPosition().clone(), viewer.navigation.getEyeVector().clone().normalize() );
let ignoreTransparent = false;
let intersection = viewer.impl.rayIntersect( ray, ignoreTransparent );
if( !intersection ) return;
console.log( 'hit something' );
// intersection.dbId //!<< interseted object id
// intersection.distance //!<< the distance between the hit target and the ray position
});
ref: https://forge.autodesk.com/en/docs/viewer/v7/reference/Viewing/GuiViewer3D/