var
RayOrigin, RayDirection: TVector3;
TileUnderMouseValid: Boolean;
TileUnderMouse: TVector2Integer;
begin
MyViewport.PositionToRay(Container.MousePosition, true, RayOrigin, RayDirection);
TileUnderMouseValid := Map.Data.PositionToTile(RayOrigin.XY, TileUnderMouse);
// ... now use TileUnderMouseValid and TileUnderMouse as you see fit
end;